Skip to content
简体中文

Scene routing ​

Set up the router ​

Provide ISceneFactory, ISceneRoot, and IGameDispatcher to SceneRouter. A managed host can use InlineGameDispatcher. In Godot, use the engine adapter and the host's main-thread dispatcher.

OperationCall
Replace the scene stackReplaceAsync
Keep the current scene under a new onePushAsync
Exit the top scene and resume the one beneath itPopAsync

Use the result to handle a guard rejecting navigation. Schedule follow-up navigation outside lifecycle callbacks. On exit, await router shutdown before releasing the scene root and dispatcher.

Apache License 2.0