Beispiel #1
0
 protected void Start()
 {
     UnityEngine.SceneManagement.SceneManager.sceneLoaded += (scene, loadingMode) =>
     {
         PhotonNetwork.NewSceneLoaded();
         PhotonNetwork.SetLevelInPropsIfSynced(SceneManagerHelper.ActiveSceneName);
     };
 }
 public void OnCreatedRoom()
 {
     PhotonNetwork.SetLevelInPropsIfSynced(SceneManagerHelper.ActiveSceneName);
 }
Beispiel #3
0
 /// <summary>Called by Unity after a new level was loaded.</summary>
 protected void OnLevelWasLoaded(int level)
 {
     PhotonNetwork.NewSceneLoaded();
     PhotonNetwork.SetLevelInPropsIfSynced(SceneManagerHelper.ActiveSceneName);
 }