Ejemplo n.º 1
0
 // Called when the scene is loaded.
 void OnSceneLoaded(Scene scene, LoadSceneMode mode)
 {
     if (LoadSceneTransitionData.PlacePlayer)
     {
         CoreSettings coreSettingsAsset = CoreSettings.LoadCoreSettings();
         coreSettings.CurrentPlatform.GetPlayerTransform().position = LoadSceneTransitionData.PlacePosition;
         LoadSceneTransitionData.PlacePlayer = false;         // Reset the player status.
         SceneManager.sceneLoaded           -= OnSceneLoaded; //Unregister this evenet.
     }
 }