NetworkManager.UpdateScene: use && instead of early return

This commit is contained in:
vis2k 2018-12-30 23:47:47 +01:00
parent fa02b01f7b
commit 3cf87c8238

View File

@ -426,19 +426,13 @@ void FinishLoadScene()
internal static void UpdateScene()
{
if (singleton == null)
return;
if (s_LoadingSceneAsync == null)
return;
if (!s_LoadingSceneAsync.isDone)
return;
if (LogFilter.Debug) { Debug.Log("ClientChangeScene done readyCon:" + s_ClientReadyConnection); }
singleton.FinishLoadScene();
s_LoadingSceneAsync.allowSceneActivation = true;
s_LoadingSceneAsync = null;
if (singleton != null && s_LoadingSceneAsync != null && s_LoadingSceneAsync.isDone)
{
if (LogFilter.Debug) { Debug.Log("ClientChangeScene done readyCon:" + s_ClientReadyConnection); }
singleton.FinishLoadScene();
s_LoadingSceneAsync.allowSceneActivation = true;
s_LoadingSceneAsync = null;
}
}
// virtual so that inheriting classes' OnDestroy() can call base.OnDestroy() too