Example #1
0
        private void OnDestroy()
        {
            if (NetworkSceneInstance == this)
            {
                NetworkSceneInstance = null;
            }

            SceneManager.sceneLoaded -= SceneManager_sceneLoaded;
        }
Example #2
0
        protected virtual void Awake()
        {
            NetworkSceneInstance = this;

            var view = this.gameObject.AddComponent <PhotonView>();

            view.ViewID = NetworkManager.NetworkedSceneViewId;

            CreateTransformHashes();

            SceneManager.sceneLoaded += SceneManager_sceneLoaded;
        }