Skip to content

Commit eaff22a

Browse files
committed
docs: update in code documentation of transitions
1 parent 64205fb commit eaff22a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Packages/mygamedevtools-scene-loader/Runtime/Interfaces/ISceneLoader.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public interface ISceneLoader
2424
/// It will transition from the current active scene (<see cref="ISceneManager.GetActiveScene()"/>)
2525
/// to the target scene (<paramref name="targetSceneInfo"/>), with an optional intermediate loading scene (<paramref name="intermediateSceneInfo"/>).
2626
/// If the <paramref name="intermediateSceneInfo"/> is not set, the transition will have no intermediate loading scene and will instead simply load the target scene directly.
27+
/// Also, you can provide a scene that wasn't loaded from this scene loader to transition from, as the <paramref name="externalOriginScene"/>,
28+
/// instead of transitioning from the current active scene.
2729
/// The complete transition flow is:
2830
/// <br/><br/>
2931
/// 1. Load the intermediate scene (if provided).<br/>
@@ -38,6 +40,9 @@ public interface ISceneLoader
3840
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
3941
/// If null, the transition will not have an intermediate loading scene.
4042
/// </param>
43+
/// <param name="externalOriginScene">
44+
/// A reference to a scene loaded outside of this scene loader, instead of taking the current active scene as the origin scene.
45+
/// </param>
4146
void TransitionToScene(ILoadSceneInfo targetSceneInfo, ILoadSceneInfo intermediateSceneInfo = null, Scene externalOriginScene = default);
4247

4348
/// <summary>
@@ -50,12 +55,12 @@ public interface ISceneLoader
5055

5156
/// <summary>
5257
/// Loads a scene additively on top of the current scene stack, optionally marking it as the active scene
53-
/// (<see cref="ISceneManager.SetActiveScene(UnityEngine.SceneManagement.Scene)"/>).
58+
/// (<see cref="ISceneManager.SetActiveScene(Scene)"/>).
5459
/// </summary>
5560
/// <param name="sceneInfo">
5661
/// Reference to the scene that's going to be loaded.
5762
/// </param>
58-
/// <param name="setActive">Should the loaded scene be marked as active? Equivalent to calling <see cref="ISceneManager.SetActiveScene(UnityEngine.SceneManagement.Scene)"/>.</param>
63+
/// <param name="setActive">Should the loaded scene be marked as active? Equivalent to calling <see cref="ISceneManager.SetActiveScene(Scene)"/>.</param>
5964
void LoadScene(ILoadSceneInfo sceneInfo, bool setActive = false);
6065
}
6166
}

Packages/mygamedevtools-scene-loader/Runtime/Interfaces/ISceneLoaderAsync.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace MyGameDevTools.SceneLoading
1717
public interface ISceneLoaderAsync<TAsync> : ISceneLoader
1818
{
1919
/// <summary>
20-
/// Async version of the <see cref="ISceneLoader.TransitionToScene(ILoadSceneInfo, ILoadSceneInfo)"/>.
20+
/// Async version of the <see cref="ISceneLoader.TransitionToScene(ILoadSceneInfo, ILoadSceneInfo, Scene)"/>.
2121
/// </summary>
2222
/// <param name="targetSceneReference">
2323
/// A reference to the scene that's going to be transitioned to.
@@ -26,6 +26,9 @@ public interface ISceneLoaderAsync<TAsync> : ISceneLoader
2626
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
2727
/// If null, the transition will not have an intermediate loading scene.
2828
/// </param>
29+
/// <param name="externalOriginScene">
30+
/// A reference to a scene loaded outside of this scene loader, instead of taking the current active scene as the origin scene.
31+
/// </param>
2932
/// <returns>
3033
/// The loading operation.
3134
/// </returns>

0 commit comments

Comments
 (0)