Skip to content

Commit

Permalink
Fix return type to AsyncOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Jan 5, 2025
1 parent 4f00648 commit e213305
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions RuntimeInternals/SceneManagerHelper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (c) 2023-2024 Koji Hasegawa.
// Copyright (c) 2023-2025 Koji Hasegawa.
// This software is released under the MIT License.

using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -42,7 +41,7 @@ public static class SceneManagerHelper
/// When loading the scene that is not in "Scenes in Build", use <see cref="TestHelper.Attributes.BuildSceneAttribute"/>.
/// </remarks>
[SuppressMessage("ReSharper", "InvalidXmlDocComment")]
public static IEnumerator LoadSceneAsync(
public static AsyncOperation LoadSceneAsync(
string path,
LoadSceneMode mode = LoadSceneMode.Single,
LocalPhysicsMode physicsMode = LocalPhysicsMode.None,
Expand Down Expand Up @@ -74,7 +73,7 @@ public static IEnumerator LoadSceneAsync(
new LoadSceneParameters(mode, physicsMode));
}

yield return loadSceneAsync;
return loadSceneAsync;
}

/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions Tests/RuntimeInternals/SceneManagerHelperTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (c) 2023-2024 Koji Hasegawa.
// Copyright (c) 2023-2025 Koji Hasegawa.
// This software is released under the MIT License.

using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
Expand Down

0 comments on commit e213305

Please sign in to comment.