/// <summary> /// Called when the GameObject is created. /// /// </summary> private void Awake() { if (Instance != null) { return; } Instance = this; SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; DontDestroyOnLoad(gameObject); }
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { // Load in the menu scene if (arg0.name == "Menu" && !init) { init = true; PlatformManager.OnLoad(); BSSceneManager.OnLoad(); //Application.logMessageReceived += LogCallback; } }
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { // Load in the menu scene if (arg0.name == "Menu" && !init) { init = true; SettingsUI.OnLoad(); BSSceneManager.OnLoad(); PlatformLoader.OnLoad(); // Load from modprefs EnvironmentHider.showFeetOverride = ModPrefs.GetBool(PluginName, "AlwaysShowFeet", false, true); EnvironmentSceneOverrider.overrideMode = (EnvironmentSceneOverrider.EnvOverrideMode)ModPrefs.GetInt(PluginName, "EnvironmentOverrideMode", 0, true); EnvironmentSceneOverrider.GetSceneInfos(); EnvironmentSceneOverrider.OverrideEnvironmentScene(); //Application.logMessageReceived += LogCallback; } }