Beispiel #1
0
        public void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }

            Init();
        }
Beispiel #2
0
        public void OnDestroy()
        {
            Instance = null;

            if (this.socketManager != null)
            {
                // Leaving this sample, close the socket
                this.socketManager.Close();
                this.socketManager = null;
            }
        }