DestroyAllClientObjects() public static method

Destroys all networked objects on the client.

public static DestroyAllClientObjects ( ) : void
return void
Example #1
0
        public void StopClient()
        {
            OnStopClient();

            if (LogFilter.logDebug)
            {
                Debug.Log("NetworkManager StopClient");
            }
            isNetworkActive = false;
            if (client != null)
            {
                // only shutdown this client, not ALL clients.
                client.Disconnect();
                client.Shutdown();
                client = null;
            }
            StopMatchMaker();

            ClientScene.DestroyAllClientObjects();
            if (m_OfflineScene != "")
            {
                ClientChangeScene(m_OfflineScene, false);
            }
        }
        public void StopClient()
        {
            OnStopClient();

            if (LogFilter.logDebug)
            {
                Debug.Log("NetworkManager StopClient");
            }
            isNetworkActive = false;
            if (client != null)
            {
                // only shutdown this client, not ALL clients.
                client.Disconnect();
                client.Shutdown();
                client = null;
            }

            ClientScene.DestroyAllClientObjects();
            if (!string.IsNullOrEmpty(m_OfflineScene))
            {
                ClientChangeScene(m_OfflineScene, false);
            }
            CleanupNetworkIdentities();
        }