private void OnDestroy() { if (NetworkSceneInstance == this) { NetworkSceneInstance = null; } SceneManager.sceneLoaded -= SceneManager_sceneLoaded; }
protected virtual void Awake() { NetworkSceneInstance = this; var view = this.gameObject.AddComponent <PhotonView>(); view.ViewID = NetworkManager.NetworkedSceneViewId; CreateTransformHashes(); SceneManager.sceneLoaded += SceneManager_sceneLoaded; }