private IEnumerator LoadFightMap() { string fightMapBundleName = AssetBundlesUtility.GetFightMapAssetBundleName(m_fightMapId); string fightMapSceneName = ScenesUtility.GetFightMapSceneName(m_fightMapId); yield return(LoadSceneAndBundleRequest(fightMapSceneName, fightMapBundleName)); Scene sceneByName = SceneManager.GetSceneByName(fightMapSceneName); if (!sceneByName.IsValid()) { Log.Error("Could not load scene named '" + fightMapSceneName + "' from bundle named '" + fightMapBundleName + "'.", 217, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs"); yield break; } m_fightMapScene = sceneByName; FightMap componentInRootGameObjects = ScenesUtility.GetComponentInRootGameObjects <FightMap>(sceneByName); if (null == componentInRootGameObjects) { Log.Error("Could not find a FightMap in scene named '" + fightMapSceneName + "'.", 226, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs"); yield break; } FightMap.current = componentInRootGameObjects; MapRenderSettings.ApplyToScene(FightMap.current.ambience); }
protected override IEnumerator Load() { yield return(SceneManager.LoadSceneAsync("SplashUI", 1)); m_splashUIScene = SceneManager.GetSceneByName("SplashUI"); while (!m_splashUIScene.get_isLoaded()) { yield return(null); } m_ui = ScenesUtility.GetSceneRoot <AbstractUI>(m_splashUIScene); m_ui.SetDepth(this); }
protected static bool TryGetSceneAndRoot <T>(string sceneName, out Scene scene, out T root) where T : MonoBehaviour { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) scene = SceneManager.GetSceneByName(sceneName); if (!scene.IsValid()) { Log.Error("Invalid scene '" + sceneName + "'.", 144, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\LoadSceneStateContext.cs"); root = default(T); return(false); } root = ScenesUtility.GetSceneRoot <T>(scene); return(null != (object)root); }
protected override IEnumerator Load() { string sceneName = ScenesUtility.GetHavreMapSceneName(PlayerData.instance.havreMapSceneIndex); yield return(LoadSceneAndBundleRequest(sceneName, "core/scenes/maps/havre_maps")); if (!LoadSceneStateContext.TryGetSceneAndRoot(sceneName, out Scene _, out m_havreMap)) { Log.Error("could not find Havre Map", 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\HavreDimension\\HavreDimensionMainState.cs"); yield break; } yield return(m_havreMap.Initialize()); yield return(LoadCharacterSkin()); yield return(LoadGod()); m_havreMap.InitEnterAnimFirstFrame(); }