private void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode) { Debug.Log(scene.name); Debug.Log(mode.ToString()); this.SearchSpawnPoints(); this.SpawnPlayer(); }
// scene loaded private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.Log("GameController::OnSceneLoaded(" + scene.name + ": " + mode.ToString() + ")"); if (!loadedScenes.ContainsKey(scene.name)) { loadedScenes.Add(scene.name, true); } }
public void OnSceneLoaded(Scene s, LoadSceneMode mode) { Debug.Log("LvlMgr::OnSceneLoaded() - Scene Loaded: " + s.ToString()); Debug.Log(mode.ToString()); CurrentScene = s; SceneManager.SetActiveScene(CurrentScene); // so new objs will spawn in here UIMgr.instance.enableHudUI(); }
private void SceneManager_sceneLoaded(Scene scene, LoadSceneMode loadSceneMode) { var message = string.Format("SceneManager:scene {0} loaded", scene.name); Log(message, LogType.Log, BreadcrumbLevel.Navigation, new Dictionary <string, string>() { { "LoadSceneMode", loadSceneMode.ToString() } }); }
void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode) { Debug.Log("Level Loaded" + scene.name + " " + mode.ToString()); if (fader != null) { fader.FadeOut(); } StartCoroutine(setupLevel(scene)); }
// called second void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.LogFormat("OnSceneLoaded: {0},Mode = {1}", scene.name, mode.ToString()); if (isAny) { ExecuteInvoke(); } else if (SceneName == scene.name) { ExecuteInvoke(); } }
private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { UnityEngine.Debug.Log("UIManager " + scene.name + " loaded mode is " + mode.ToString()); SceneManager.SetActiveScene(scene); runningScene.Add(scene); if (pushSceneMessage.ContainsKey(scene.name)) { List <UIPage> list = pushSceneMessage[scene.name]; for (int i = 0; i < list.Count; i++) { list[i].OnUIMessage(UIMEssageType.PushScene, scene.name); } } }
/// <summary> /// Sets the internal boolean of waiting to false which allows the transitions to fade back in. /// </summary> /// <param name="scene">The scene loaded in.</param> /// <param name="mode">The mode the scene was loaded by.</param> public void DoneWaitingOnLoad(Scene scene, LoadSceneMode mode) { if (DebugManager.instance.enableDebug && DebugManager.instance.debugFinishedLoadingSceneName) { Debug.Log("DoneWaitingOnLoad(" + scene.name + ", " + mode.ToString() + ")"); } if (mode == LoadSceneMode.Additive) { } else { } isWaitingOnLoad = false; }
/// <summary> /// 开始读取场景 /// </summary> /// <param name="scene"></param> /// <param name="mode"></param> /// <param name="async"></param> /// <param name="progress"></param> private void LoadScene(int buildIndex, string sceneName, LoadSceneType type, LoadSceneMode mode, bool async, Action <float> progress) { if (m_EditorLog) { Debug.LogFormat( "Globle -> Before Load Scene({0}). Type({1}) Mode({2}) Async({3})", type == LoadSceneType.BuildIndex ? buildIndex.ToString() : sceneName, type.ToString(), mode.ToString(), async.ToString() ); } OnLoadScene(buildIndex, sceneName, type, mode, async); // 发送开始读取场景事件 s_OnLoadSceneArgs.activeScene = SceneManager.GetActiveScene(); s_OnLoadSceneArgs.buildIndex = buildIndex; s_OnLoadSceneArgs.sceneName = sceneName; s_OnLoadSceneArgs.type = type; s_OnLoadSceneArgs.mode = mode; s_OnLoadSceneArgs.async = async; this.SendByMessageCenter(k_Event_OnLoadScene, s_OnLoadSceneArgs); if (type == LoadSceneType.BuildIndex) { if (async) { AsyncOperation operation = SceneManager.LoadSceneAsync(buildIndex, mode); StartCoroutine(LoadingOrUnloadingScene(operation, progress)); } else { SceneManager.LoadScene(buildIndex, mode); } } else { if (async) { AsyncOperation operation = SceneManager.LoadSceneAsync(sceneName, mode); StartCoroutine(LoadingOrUnloadingScene(operation, progress)); } else { SceneManager.LoadScene(sceneName, mode); } } }
private void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode) { Debug.Log("> OnLevelFinishedLoading scene=" + scene.name + " mode=" + mode.ToString()); sceneTransitionManager = null; // ensure reference to previous scene manager is cleared battleManager = null; if (scene.name == "Overworld") { LoadOverworld(); } else if (scene.name == "Battle") { LoadBattle(); } }
/// <summary> /// /// </summary> /// <remarks> /// Replace with /// void CheckLevelLoaded(Scene scene, LoadSceneMode mode) /// </remarks> void CheckLevelLoaded(UnityEngine.SceneManagement.Scene scene, LoadSceneMode mode) { Debug.Log(scene.name + " : " + mode.ToString()); if (SceneManager.GetActiveScene().name != "startup") { if (global == this) { Player = GameObject.Find("Player"); FollowerSettings = Player.GetComponentInChildren <FollowerMovement>(); if (global.fadeIn) { StartCoroutine(ScreenFade.main.Fade(true, ScreenFade.slowedSpeed)); //if fading in to the scene. Player.transform.position = global.playerPosition; PlayerMovement.player.direction = global.playerDirection; if (!respawning) { PlayerMovement.player.pauseInput(0.6f); } else { PlayerMovement.player.pauseInput(0.4f); } if (playerForwardOnLoad) { PlayerMovement.player.forceMoveForward(); playerForwardOnLoad = false; } } else { ScreenFade.main.SetToFadedIn(); } FollowerSettings.changeFollower(followerIndex); } } }
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { Log("Scene Loaded: " + arg0.name + " " + arg1.ToString()); }
/// <summary> /// 异步场景读取完成事件. /// </summary> /// <param name="scene"></param> /// <param name="mode"></param> /// <returns></returns> private IEnumerator SceneManager_sceneLoadedAsync(Scene scene, LoadSceneMode mode) { if (m_EditorLog) { Debug.LogFormat("Globle -> Scene({0} - {1}) is loaded by mode '{2}'.", scene.buildIndex, scene.name, mode.ToString()); } yield return(OnSceneLoaded(scene, mode)); // 发送场景读取完成事件 s_OnSceneLoadedArgs.scene = scene; s_OnSceneLoadedArgs.mode = mode; this.SendByMessageCenter(k_Event_OnSceneLoaded, s_OnSceneLoadedArgs); }
void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.Log("Global object: Scene loaded! => name:" + scene.name + " index: " + scene.buildIndex.ToString()); Debug.Log(mode.ToString()); if (scene.buildIndex == GameConstants.SCENE_INDEX_COMMANDER_SELECT) { GlobalObject.instance.LoadCommanderSelectUI(); } else if (SceneManager.GetActiveScene().buildIndex == GameConstants.SCENE_INDEX_GAME_COMMANDERS) { Debug.Log("GLOBAL OBJECT TRYING TO LOAD COMMANDER GAME SCENE!"); //Try to find UI manager object for loading commander images GameObject battleUIManagerObj = GameObject.Find("LevelCanvas"); GlobalObject.instance.battleUIManagerScript = battleUIManagerObj.GetComponent <BattleUIManager>(); this.battleCommanders = new List <Commander>(); //Trigger UI object to load commander images this.battleCommanders = GlobalObject.instance.battleUIManagerScript.SetSelectedCommanderBattleImages(); //Set data attributes of the commanders CommanderData playerCommanderData = GlobalObject.instance.humanPlayerCommanderData; CommanderData enemyCommanderData = GlobalObject.instance.enemyCommanderData; //Set mana per turn in the playfield from the commanders PlayField.instance.manaPerTurn = playerCommanderData.ManaPerTurn; PlayField.instance.manaPerTurnAi = enemyCommanderData.ManaPerTurn; Debug.LogWarning("GlobalObject: setting mana per turn: " + PlayField.instance.manaPerTurn.ToString() + " and mana per turn AI is: " + PlayField.instance.manaPerTurnAi.ToString()); //Iterate through list of commanders thrown back by the UI manager that set images for (int i = 0; i < battleCommanders.Count; i++) { Commander currCommander = battleCommanders[i]; Debug.LogWarning("Global object! commanders index: " + i.ToString() + " and player id is:" + currCommander.playerId.ToString()); //TODO: need unique conten ids or something better to match on here if (currCommander == null) { Debug.LogWarning("CURR COMMANDER IS NULL!!!"); } //Set player ids for the enemy commmander. We know it's not the player's if the player id is UNSET if (currCommander.playerId == GameConstants.UNSET_PLAYER_ID) { currCommander.playerId = GameConstants.ENEMY_PLAYER_ID; Debug.LogWarning("CURR COMMANDER HAS UNSET ID! SETTING TO ENEMY ID!"); } //TODO: Fix bug here - matching off of commander name //if (currCommander.commanderData.CharName == playerCommanderData.CharName) { // currCommander.playerId = GameConstants.HUMAN_PLAYER_ID; //} else if (currCommander.commanderData.CharName == enemyCommanderData.CharName) { // currCommander.playerId = GameConstants.ENEMY_PLAYER_ID; //} //Set the rest of attributes currCommander.SetCommanderAttributes(currCommander.commanderData); //Set necessary UI references - not 100% sure why this didn't work when attempting to do so from within the BattleUIManager's SetSelectedCommanderBattleImages but for some reason results in a null ref if not set here GlobalObject.instance.battleUIManagerScript.SetCommanderUIPanel(ref currCommander); //Initialize some UI data to store variables and then set the display text for current charge and total cost currCommander.commanderUIPanel.Initialize(currCommander.playerId); currCommander.commanderUIPanel.SetCommanderResourceText(0, currCommander.abilityChargeCost); //Fire off notification for Commanders that the battle has started Debug.Log("SUHHHHHHHH************* " + currCommander.commanderName); currCommander.OnBattleStart(); } //TODO: Need to change the logic for this at some point } }
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { Debug.Log("+LOADED: " + arg0.name + " mode: " + arg1.ToString()); Load(); }
private void OnSceneLoaded(Scene loadedScene, LoadSceneMode mode) { Debug.Log("[OnSceneLoaded] Scene Name : " + loadedScene.name + ", Mode : " + mode.ToString()); }
public void OnSceneLoaded(Scene scene, LoadSceneMode loadSceneMode) { Debug.Log("OnSceneLoaded is called! scene = " + scene.name + ", loadSceneMode = " + loadSceneMode.ToString()); BaseSceneMain baseSceneMain = GameObject.FindObjectOfType <BaseSceneMain>(); Debug.Log("OnSceneLoaded! baseSceneMain.name = " + baseSceneMain.name); SystemManager.Instance.CurrentSceneMain = baseSceneMain; }
private void SceneDebug(Scene scene, LoadSceneMode mode) { print("Scene: " + scene.name); print(" Loaded"); print(" LoadScreneMode: " + mode.ToString()); }
// called second void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Logger.DebugFormat("OnSceneLoaded: {0},Mode = {1}", scene.name, mode.ToString()); Execute(); }
void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.Log("Scene Loaded:" + scene.name + "Scene Mode: " + mode.ToString()); updatedVisual = false; }
public void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Log.Info($"SceneLoader - Loaded scene {scene.name} in mode {mode.ToString()}"); UnityUtils.DumpSceneObjects(); }
void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.Log("Loaded scene: " + scene.name + ". Mode: " + mode.ToString()); SceneManager.SetActiveScene(scene); }
static void OnSceneLoaded(Scene scene, LoadSceneMode mode) { Debug.Log("Scene " + scene.name + " (" + scene.path + ") loaded with mode: " + mode.ToString()); if (scene == startScene) { Debug.Log("Loaded Scene is start scene"); MarkerSavesDirectory = (Application.dataPath + "\\MarkerLocations\\Courthouse").Replace('/', '\\'); if (!Directory.Exists(MarkerSavesDirectory)) { Directory.CreateDirectory(MarkerSavesDirectory); Debug.Log("Created Directory at " + MarkerSavesDirectory); } LocationManagerUI.Instance.UpdateMarkerList(); } }