internal static void Shutdown() { s_NetworkScene.Shutdown(); s_LocalPlayers = new List <PlayerController>(); s_PendingOwnerIds = new List <PendingOwner>(); s_SpawnableObjects = null; s_ReadyConnection = null; s_IsReady = false; s_IsSpawnFinished = false; NetworkTransport.Shutdown(); NetworkTransport.Init(); }
internal static void UpdateScene() { #if UNITY_EDITOR // In the editor, reloading scripts in play mode causes a Mono Domain Reload. // This gets the transport layer (C++) and HLAPI (C#) out of sync. // This check below detects that problem and shuts down the transport layer to bring both systems back in sync. 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(); // destroy network objects var uvs = FindObjectsOfType <NetworkIdentity>(); foreach (var uv in uvs) { GameObject.Destroy(uv.gameObject); } singleton.StopHost(); NetworkTransport.Shutdown(); } #endif if (singleton == null) { return; } if (s_LoadingSceneAsync == null) { return; } if (!s_LoadingSceneAsync.isDone) { return; } if (LogFilter.logDebug) { Debug.Log("ClientChangeScene done readyCon:" + s_ClientReadyConnection); } singleton.FinishLoadScene(); s_LoadingSceneAsync.allowSceneActivation = true; s_LoadingSceneAsync = null; }
internal static void Shutdown() { ClientScene.s_NetworkScene.Shutdown(); ClientScene.s_LocalPlayers = new List <PlayerController>(); ClientScene.s_PendingOwnerIds = new List <ClientScene.PendingOwner>(); ClientScene.s_SpawnableObjects = (Dictionary <NetworkSceneId, NetworkIdentity>)null; ClientScene.s_ReadyConnection = (NetworkConnection)null; ClientScene.s_IsReady = false; ClientScene.s_IsSpawnFinished = false; ClientScene.s_ReconnectId = -1; NetworkTransport.Shutdown(); NetworkTransport.Init(); }
internal static void Shutdown() { s_NetworkScene.Shutdown(); s_LocalPlayers = new List <PlayerController>(); s_PendingOwnerIds = new List <PendingOwner>(); s_SpawnableObjects = null; s_ReadyConnection = null; s_IsReady = false; s_IsSpawnFinished = false; #if ENABLE_UNET_HOST_MIGRATION s_ReconnectId = ReconnectIdInvalid; #endif NetworkTransport.Shutdown(); NetworkTransport.Init(); }
public void Shutdown() { NetworkTransport.Shutdown(); }
public override void Shutdown() { m_UnetChannelLookup.Clear(); m_TransportChannelLookup.Clear(); Unet.Shutdown(); }