Example #1
0
        public virtual void Disconnect()
        {
#if FN_WEBSERVER
            webserver.Stop();
#endif

            Networker.objectCreated -= CreatePendingObjects;

            if (Networker != null)
            {
                Networker.Disconnect(false);
            }

            if (sqpServer != null)
            {
                sqpServer.ShutDown();
            }

            NetWorker.EndSession();

            NetworkObject.ClearNetworkObjects(Networker);
            pendingObjects.Clear();
            pendingNetworkObjects.Clear();
            MasterServerNetworker = null;
            Networker             = null;
            Instance = null;
            Destroy(gameObject);
        }
Example #2
0
        private void OnApplicationQuit()
        {
            if (Networker != null)
            {
                Networker.Disconnect(false);
            }

            NetWorker.EndSession();
        }
        protected virtual void OnApplicationQuit()
        {
            if (Networker != null)
            {
                Networker.Disconnect(false);
            }

            NetWorker.EndSession();
        }
Example #4
0
 private void Disconnect()
 {
     if (networker != null)
     {
         networker.Disconnect();
     }
     else
     {
         Debug.Log("Cannot find networker.");
     }
 }
Example #5
0
 void OnApplicationQuit()
 {
     Networker.Disconnect();
 }