コード例 #1
0
    void OnLevelWasLoaded(int index)
    {
        if (sceneController != null)
        {
            string levelName = SceneManager.GetActiveScene().name;
            //Debug.Log ("GAME CONTROLLER ON LEVEL LOADED: " +  Application.loadedLevelName);

            if (levelName.Contains("Authenticate") && (sceneController.previousScene != SceneController.GameScenes.Null || sceneController.previousScene != SceneController.GameScenes.Splash))
            {
                //Debug.Log("MADE IT THROUGH THE IF STATEMENT");
                DialogCanvasController.RequestInterstitial();
            }
            else if (levelName.Contains("CharacterSelect"))
            {
                DialogCanvasController.RequestInterstitial();
                CharacterSelectDataRefresh();
            }
            else if (levelName.Contains("Profile"))
            {
                CharacterProfileDataRefresh();
            }
            else if (levelName.Contains("Gameplay"))
            {
                DialogCanvasController.RequestInterstitial();
            }
        }
    }
コード例 #2
0
 void OnLevelLoad(Scene scene, LoadSceneMode mode)
 {
     if (sceneController == null)
     {
         return; // This seems like a critical error ...???
     }
     if (scene.name.Contains("Authenticate") && (sceneController.previousScene != SceneController.GameScenes.Null || sceneController.previousScene != SceneController.GameScenes.Splash))
     {
         DialogCanvasController.RequestInterstitial();
     }
     else if (scene.name.Contains("CharacterSelect"))
     {
         DialogCanvasController.RequestInterstitial();
         CharacterSelectDataRefresh();
     }
     else if (scene.name.Contains("Profile"))
     {
         CharacterProfileDataRefresh();
     }
     else if (scene.name.Contains("Gameplay"))
     {
         DialogCanvasController.RequestInterstitial();
     }
 }