public IEnumerator LoadSceneAndBundleRequest(string sceneName, string bundleName, LoadSceneMode mode = 1, Action <SceneLoadRequest> completed = null) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) AssetBundleLoadRequest bundleLoadRequest = this.LoadAssetBundle(bundleName); while (!bundleLoadRequest.get_isDone()) { yield return(null); } AssetManagerError error; if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0) { error = bundleLoadRequest.get_error(); Log.Error(((object)error).ToString(), 112, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\LoadSceneStateContext.cs"); yield break; } LoadSceneParameters val = default(LoadSceneParameters); val._002Ector(mode); SceneLoadRequest sceneLoadRequest = this.LoadScene(sceneName, bundleName, val, true, completed); while (!sceneLoadRequest.get_isDone()) { yield return(null); } if (AssetManagerError.op_Implicit(sceneLoadRequest.get_error()) != 0) { error = sceneLoadRequest.get_error(); Log.Error(((object)error).ToString(), 126, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\LoadSceneStateContext.cs"); } }
private void OnSceneLoadRequestComplete(SceneLoadRequest sceneLoadRequest) { if (!TryGetSceneAndRoot(sceneLoadRequest.sceneName, out m_uiScene, out m_ui)) { Log.Error("Something went wrong while loading scene named '" + sceneLoadRequest.sceneName + "'.", 78, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\LoadSceneStateContext.cs"); } if (m_disableOnLoad) { m_ui.get_gameObject().SetActive(false); } m_ui.SetDepth(m_stateHoster); }
public void LoadEmptyScene(string sceneBehaviorName, SceneLoadMode sceneLoadMode = SceneLoadMode.PreserveAssets) { _sceneLoadRequest = SceneLoadRequest.LoadEmptyScene(sceneBehaviorName, sceneLoadMode); }
public void LoadScene(string path, SceneLoadMode sceneLoadMode = SceneLoadMode.PreserveAssets) { _sceneLoadRequest = SceneLoadRequest.LoadSceneFromFile(path, sceneLoadMode); }