Skip to content

ISceneManager.LoadScene Method

Definition

Namespace: Brine2D.Engine

Overloads
LoadScene\(Type, ISceneTransition, LoadingScene, CancellationToken\) Requests a scene transition by runtime System.Type. Use for data-driven flows where the scene type is not known at compile time.
LoadScene<TScene,TLoadingScene>\(ISceneTransition, CancellationToken\) Requests a scene transition with a loading screen displayed during the load.
LoadScene<TScene>\(ISceneTransition, CancellationToken\) Requests a scene transition. Fire-and-forget: the load runs in the background and the returned task does not represent load completion. React to the transition in the target scene's Scene.OnEnter or handle failures via SceneLoadFailed.
LoadScene<TScene>\(Func<IServiceProvider,TScene>, ISceneTransition, LoadingScene, CancellationToken\) Requests a scene transition using a factory function. Use when you need to pass runtime data that DI alone cannot provide.

ISceneManager.LoadScene\(Type, ISceneTransition, LoadingScene, CancellationToken\) Method

Requests a scene transition by runtime System.Type. Use for data-driven flows where the scene type is not known at compile time.

C#
void LoadScene(System.Type sceneType, Brine2D.Engine.ISceneTransition? transition=null, Brine2D.Engine.LoadingScene? loadingScreen=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

sceneType System.Type

transition ISceneTransition

loadingScreen LoadingScene

cancellationToken System.Threading.CancellationToken

ISceneManager.LoadScene\<TScene,TLoadingScene>\(ISceneTransition, CancellationToken\) Method

Requests a scene transition with a loading screen displayed during the load.

C#
void LoadScene<TScene,TLoadingScene>(Brine2D.Engine.ISceneTransition? transition=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
    where TScene : Brine2D.Engine.Scene
    where TLoadingScene : Brine2D.Engine.LoadingScene;

Type parameters

TScene

TLoadingScene

Parameters

transition ISceneTransition

cancellationToken System.Threading.CancellationToken

ISceneManager.LoadScene\<TScene>\(ISceneTransition, CancellationToken\) Method

Requests a scene transition. Fire-and-forget: the load runs in the background and the returned task does not represent load completion. React to the transition in the target scene's Scene.OnEnter or handle failures via SceneLoadFailed.

C#
void LoadScene<TScene>(Brine2D.Engine.ISceneTransition? transition=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
    where TScene : Brine2D.Engine.Scene;

Type parameters

TScene

Parameters

transition ISceneTransition

cancellationToken System.Threading.CancellationToken

ISceneManager.LoadScene\<TScene>\(Func\<IServiceProvider,TScene\>, ISceneTransition, LoadingScene, CancellationToken\) Method

Requests a scene transition using a factory function. Use when you need to pass runtime data that DI alone cannot provide.

C#
void LoadScene<TScene>(System.Func<System.IServiceProvider,TScene> sceneFactory, Brine2D.Engine.ISceneTransition? transition=null, Brine2D.Engine.LoadingScene? loadingScreen=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
    where TScene : Brine2D.Engine.Scene;

Type parameters

TScene

Parameters

sceneFactory System.Func<System.IServiceProvider,TScene>

transition ISceneTransition

loadingScreen LoadingScene

cancellationToken System.Threading.CancellationToken