private void SceneLoaded(UnityEngine.SceneManagement.Scene _scene, UnityEngine.SceneManagement.LoadSceneMode _loadSceneMode) { AssignOverrides(); }
void OnSceneLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode loadingMode) { this.CalledOnLevelWasLoaded(scene.buildIndex); }
private void OnSceneLoaded(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { LightningBolt.ClearCache(); }
private void SceneManager_sceneLoaded(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { ui.SetActive(!PhotonNetwork.inRoom); }
static void OnEditorSceneOpened(UnityEngine.SceneManagement.Scene scene, OpenSceneMode mode) { CheckSceneStatus(); }
public static void SaveScene() { UnityEngine.SceneManagement.Scene currentScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene(); EditorSceneManager.SaveScene(currentScene); }
///////////////////////////////////////// static void OnSceneOpened(UnityScene scene, OpenSceneMode mode) { CreateHashTable(); }
private void Init(UnityEngine.SceneManagement.Scene inScene, int index) { Scene = inScene; Index = index; Name = inScene.name; }
public static extern bool BakeAsync(Scene scene);
public static extern bool Bake(Scene scene);
private void SceneManagerOnSceneLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode loadSceneMode) { SceneLoadedHandler(scene.buildIndex); }
public void OnActiveSceneChanged(UnityEngine.SceneManagement.Scene prevScene, UnityEngine.SceneManagement.Scene nextScene) { Logger.log?.Debug($"{name}: LoadingScene({nextScene.name} : {nextScene.path})"); if (StabilityPeriodActive) // because of fast restart/exit combined with long StabilityDurationCheck { CancelInvoke("StopStabilityCheckPeriod"); // Cancel previous session's StopStabilityCheckPeriod } if (nextScene.name == "GameCore") { IsMultiplayer = (Resources.FindObjectsOfTypeAll <MultiplayerController>().LastOrDefault() != null); if (IsMultiplayer) { Logger.log?.Info($"Starting Multiplayer play session, AutoPauseStealth will NOT pause the game !"); return; } // LastOrDefault() because BeatSaber don't know how to clean and keep every objects created per song play ... // Lazy fix => LastOrDefault() should assure to grab SinglePlayer related objects ... // Note : Counter++ setting page load a """level""" (but without any ScoreController) ScoreController = Resources.FindObjectsOfTypeAll <ScoreController>().LastOrDefault(); if (ScoreController == null) { Logger.log?.Warn("Couldn't find ScoreController object, probably not a vanilla GameCore scene"); return; } SongController = Resources.FindObjectsOfTypeAll <SongController>().LastOrDefault(); if (SongController == null) { Logger.log?.Warn("Couldn't find SongController object, probably not a vanilla GameCore scene"); return; } RestartController = Resources.FindObjectsOfTypeAll <StandardLevelRestartController>().LastOrDefault(); if (RestartController == null) { RestartController = Resources.FindObjectsOfTypeAll <MissionLevelRestartController>().LastOrDefault(); if (RestartController == null) { RestartController = Resources.FindObjectsOfTypeAll <TutorialRestartController>().LastOrDefault(); if (RestartController == null) { Logger.log?.Warn("Couldn't find RestartController object, probably not a vanilla GameCore scene"); return; } } } StabilityPeriodActive = true; b_inGame = true; f_stabilityTimer = 0.0f; Invoke("StopStabilityCheckPeriod", PluginSettings.Instance.MaxWaitingTime); } else { b_inGame = false; } }
private void SceneLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode) { LevelStart(); }
private static void SceneManager_activeSceneChanged(UnityEngine.SceneManagement.Scene oldScene, UnityEngine.SceneManagement.Scene newScene) { }
static void BuildPlayer() { if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android) { Debug.LogError("请选择 Android 平台后,再次打包!!!"); return; } // 将 meta 设置为 text 模式 if (SerializationMode.ForceText != EditorSettings.serializationMode) { Debug.LogError("请将 Edit->Project Setting->Asset Serialization->Mode 设置项设置为 ForceText"); return; //EditorSettings.serializationMode = SerializationMode.ForceText; } string gplayConfigPath = Application.streamingAssetsPath + "/GPlayConfig.xml"; if (File.Exists(gplayConfigPath)) { File.Delete(gplayConfigPath); } #region 得到需要打包的场景 List <string> buildScenes = new List <string>(); foreach (var buildScene in EditorBuildSettings.scenes) { if (buildScene.enabled) { buildScenes.Add(buildScene.path); } } if (buildScenes.Count == 0) { UnityEngine.SceneManagement.Scene activeScene = EditorSceneManager.GetActiveScene(); if (string.IsNullOrEmpty(activeScene.path)) { //EditorApplication.ExecuteMenuItem("File/BuildSettings"); EditorWindow.GetWindow(ReflectionUtility.GetType("UnityEditor.BuildPlayerWindow"), true, "Build Settings"); Debug.Log("请在BuildSetting中添加要打包的场景"); return; } else { buildScenes.Add(activeScene.path); } } #endregion #region 生成配置文件 if (!Directory.Exists(Application.streamingAssetsPath)) { Directory.CreateDirectory(Application.streamingAssetsPath); } var gplayConfig = new GPlayConfig() { unityVersion = Application.unityVersion }; // 生成资源配置信息 gplayConfig.resConfig = ResourceConfigUtility.Generate(buildScenes); SerializeUtility.XmlSerializeToFile <GPlayConfig>(gplayConfig, Application.streamingAssetsPath + "/GPlayConfig.xml"); AssetDatabase.Refresh(); //processWindow.Close(); #endregion //// 设置为非开发模式 //EditorUserBuildSettings.development = false; //ReflectionUtility.BuildPlayerWithDefaultSettings(true, BuildOptions.ShowBuiltPlayer); //// 删除配置文件 //AssetDatabase.DeleteAsset("Assets/StreamingAssets/GPlayConfig.xml"); #region comment //string path = EditorUtility.SaveFolderPanel("Choose Location of Built Game", "", ""); //path = Path.Combine(path, GetBuildFileName()); //BuildOptions options = BuildOptions.None; //if (EditorUserBuildSettings.allowDebugging && EditorUserBuildSettings.development) // options |= BuildOptions.AllowDebugging; //if (EditorUserBuildSettings.development) // options |= BuildOptions.Development; //if (EditorUserBuildSettings.connectProfiler) // options |= BuildOptions.ConnectWithProfiler; //BuildPipeline.BuildPlayer(buildScenes.ToArray(), path, EditorUserBuildSettings.activeBuildTarget, options); #endregion }
public SceneWrapper(UnityEngine.SceneManagement.Scene inScene, int index) { Init(inScene, index); }
private void BuildPoints(ParticleManager gm) { gm.system.CreateFromDictionary(pointsList.CurrDict); poolScene = gm.system.factory.poolScene; builtPoints = true; }
private void SceneManagerSceneLoaded(UnityEngine.SceneManagement.Scene s, UnityEngine.SceneManagement.LoadSceneMode m) { tweens.Clear(); }
private void SceneManager_sceneLoaded(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { SceneChanged = true; }
public void OnProcessScene(UnityEngine.SceneManagement.Scene scene, BuildReport report) { m_method.Invoke(null, null); }
/// <summary> /// Unity 5.4+ scene changed callback /// </summary> #if UNITY_5_4_OR_NEWER void OnSceneFinishedLoading(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode) { _newSceneLoaded = true; }
/** * <summary>Gets a Behaviour that is in the same scene as a given GameObject.</summary> * <param name = "_gameObject">The GameObject in the scene</param> * <returns>The Behaviour that is in the same scene as the given GameObject</returns> */ public static T GetOwnSceneInstance <T> (GameObject gameObject) where T : Behaviour { UnityEngine.SceneManagement.Scene ownScene = gameObject.scene; return(GetSceneInstance <T> (ownScene)); }
static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.SceneManagement.Scene instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch (ptr_of_this_method->ObjectType) { case ObjectTypes.Object: { __mStack[ptr_of_this_method->Value] = instance_of_this_method; } break; case ObjectTypes.FieldReference: { var ___obj = __mStack[ptr_of_this_method->Value]; if (___obj is ILTypeInstance) { ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method; } else { var t = __domain.GetType(___obj.GetType()) as CLRType; t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method); } } break; case ObjectTypes.StaticFieldReference: { var t = __domain.GetType(ptr_of_this_method->Value); if (t is ILType) { ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method; } else { ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method); } } break; case ObjectTypes.ArrayReference: { var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.SceneManagement.Scene[]; instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method; } break; } }
private void SceneManager_activeSceneChanged(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.Scene arg1) { LevelWasLoaded(); }
private void SceneManagerSceneLoaded(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { ResetState(ClearGesturesOnLevelLoad); }
static int _m_LoadScene_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _sceneBuildIndex = LuaAPI.xlua_tointeger(L, 1); UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneBuildIndex); return(0); } if (gen_param_count == 1 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) { string _sceneName = LuaAPI.lua_tostring(L, 1); UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneName); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable <UnityEngine.SceneManagement.LoadSceneMode>(L, 2)) { int _sceneBuildIndex = LuaAPI.xlua_tointeger(L, 1); UnityEngine.SceneManagement.LoadSceneMode _mode; translator.Get(L, 2, out _mode); UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneBuildIndex, _mode); return(0); } if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable <UnityEngine.SceneManagement.LoadSceneParameters>(L, 2)) { int _sceneBuildIndex = LuaAPI.xlua_tointeger(L, 1); UnityEngine.SceneManagement.LoadSceneParameters _parameters; translator.Get(L, 2, out _parameters); UnityEngine.SceneManagement.Scene gen_ret = UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneBuildIndex, _parameters); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SceneManagement.LoadSceneMode>(L, 2)) { string _sceneName = LuaAPI.lua_tostring(L, 1); UnityEngine.SceneManagement.LoadSceneMode _mode; translator.Get(L, 2, out _mode); UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneName, _mode); return(0); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SceneManagement.LoadSceneParameters>(L, 2)) { string _sceneName = LuaAPI.lua_tostring(L, 1); UnityEngine.SceneManagement.LoadSceneParameters _parameters; translator.Get(L, 2, out _parameters); UnityEngine.SceneManagement.Scene gen_ret = UnityEngine.SceneManagement.SceneManager.LoadScene( _sceneName, _parameters); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SceneManagement.SceneManager.LoadScene!")); }
static void SetGameRootAsFirstScene() { UnityEngine.SceneManagement.Scene scene = EditorSceneManager.GetActiveScene(); SetBuildSettingFirstScene(scene); SetPlayModeStartScene(scene.path); }
private void OnSceneSaved(UnityEngine.SceneManagement.Scene scene) { MarkNeedsCompute(); }
private static void ChangedActiveScene(UnityEngine.SceneManagement.Scene current, UnityEngine.SceneManagement.Scene next) { widgetCache.Clear(); }
public void OnSceneLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode) { FinishedLoadingScene(scene.name, scene.buildIndex); }
public void SetUp() { scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); child = new GameObject("childObject"); }