UnityEngine.Networking.NetworkManager.UpdateScene C# (CSharp) Method

UpdateScene() static private method

static private UpdateScene ( ) : void
return void
        internal static void UpdateScene()
        {
            if (((singleton == null) && (s_PendingSingleton != null)) && s_DomainReload)
            {
                if (LogFilter.logWarn)
                {
                    Debug.LogWarning("NetworkManager detected a script reload in the editor. This has caused the network to be shut down.");
                }
                s_DomainReload = false;
                s_PendingSingleton.InitializeSingleton();
                NetworkIdentity[] identityArray = UnityEngine.Object.FindObjectsOfType<NetworkIdentity>();
                foreach (NetworkIdentity identity in identityArray)
                {
                    UnityEngine.Object.Destroy(identity.gameObject);
                }
                singleton.StopHost();
                NetworkTransport.Shutdown();
            }
            if (((singleton != null) && (s_LoadingSceneAsync != null)) && s_LoadingSceneAsync.isDone)
            {
                if (LogFilter.logDebug)
                {
                    Debug.Log("ClientChangeScene done readyCon:" + s_ClientReadyConnection);
                }
                singleton.FinishLoadScene();
                s_LoadingSceneAsync.allowSceneActivation = true;
                s_LoadingSceneAsync = null;
            }
        }

Usage Example

コード例 #1
0
 internal static void UNetStaticUpdate()
 {
     NetworkServer.Update();
     NetworkClient.UpdateClients();
     NetworkManager.UpdateScene();
     NetworkDetailStats.NewProfilerTick(Time.time);
 }
All Usage Examples Of UnityEngine.Networking.NetworkManager::UpdateScene