Inheritance: UnityEngine.MonoBehaviour
        private void Awake()
        {
            if (Instance != null)
            {
                skipCalls = true;
                Destroy(gameObject);
                return;
            }

            Instance = this;
        }
		private void Awake()
		{
			if (Instance != null)
			{
				skipCalls = true;
				Destroy(gameObject);
				return;
			}

			Instance = this;
        }
Example #3
0
        /// <summary>
        /// Clean all the sockets and connections
        /// </summary>
        private void OnApplicationQuit()
        {
            if (NetWorkers == null || NetWorkers.Count == 0)
            {
                return;
            }

            Networking.Disconnect();

            UnityEventObject.Cleanup();
            Threading.Task.KillAll();

            NetWorkers.Clear();
            NetWorkers = null;
            instance   = null;
        }