mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: Don't call FinishLoadScene when customHandling (#2794)
* fix: Don't call FinishLoadScene when customHandling FinishLoadScene will be called from `UpdateScene` if `loadingSceneAsync != null && loadingSceneAsync.isDone` and it's the responsibility of the user in their custom handler to assign `loadingSceneAsync` to something to block FinishLoadScene until that completes. * Update Assets/Mirror/Runtime/NetworkManager.cs Co-authored-by: vis2k <info@noobtuts.com>
This commit is contained in:
parent
ae05d10903
commit
92334ba2aa
@ -800,11 +800,11 @@ internal void ClientChangeScene(string newSceneName, SceneOperation sceneOperati
|
||||
OnClientChangeScene(newSceneName, sceneOperation, customHandling);
|
||||
|
||||
// scene handling will happen in overrides of OnClientChangeScene and/or OnClientSceneChanged
|
||||
// Do not call FinishLoadScene here. Custom handler will assign loadingSceneAsync and we need
|
||||
// to wait for that to finish. UpdateScene already checks for that to be not null and isDone.
|
||||
// (in other words, custom loading needs to call FinishLoadScene when they are done)
|
||||
if (customHandling)
|
||||
{
|
||||
FinishLoadScene();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (sceneOperation)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user