Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
Is your feature request related to a problem? Please describe.
When trying to implement a loading screen for switching scenes I tried using the OnSceneSwitchStarted event to start fading to black and OnSceneSwitched event to start fading the loading screen back to being transparent. The issue here is that OnSceneSwitchStarted and the call to SceneManager.LoadSceneAsync happen at the same time meaning that the player sees the scene loading start taking place before the screen has finished fading to black.
Describe the solution you'd like
Allow the client to intercept and delay the call to SceneManager.LoadSceneAsync until we are ready (in my case it would be when the screen has fully faded to black but it could be anything). The flow should be:
Receive message to change scene
Fade over time to black
Load scene
(When scene has loaded) Fade over time to transparent
Describe alternatives you've considered
Writing my own NetworkSceneManager from scratch which I think would be awkward to integrate/replace the built in NetworkSceneManager with but regardless, I do think this should be a part of MLAPI considering almost every game out there has loading screens.
Is your feature request related to a problem? Please describe. When trying to implement a loading screen for switching scenes I tried using the OnSceneSwitchStarted event to start fading to black and OnSceneSwitched event to start fading the loading screen back to being transparent. The issue here is that OnSceneSwitchStarted and the call to SceneManager.LoadSceneAsync happen at the same time meaning that the player sees the scene loading start taking place before the screen has finished fading to black.
Describe the solution you'd like Allow the client to intercept and delay the call to SceneManager.LoadSceneAsync until we are ready (in my case it would be when the screen has fully faded to black but it could be anything). The flow should be:
Describe alternatives you've considered Writing my own NetworkSceneManager from scratch which I think would be awkward to integrate/replace the built in NetworkSceneManager with but regardless, I do think this should be a part of MLAPI considering almost every game out there has loading screens.