Skip to content

Commit

Permalink
Merge pull request #114 from nowsprinting/fix/asyncoperation_loadscen…
Browse files Browse the repository at this point in the history
…easync

Fix SceneManagerHelper.LoadSceneAsync return type to AsyncOperation
  • Loading branch information
nowsprinting authored Jan 5, 2025
2 parents 4f00648 + 1e50aeb commit 4f78186
Showing 1 changed file with 3 additions and 4 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

0 comments on commit 4f78186

Please sign in to comment.