コード例 #1
0
        /// <summary>
        /// Called when the GameObject is created.
        ///
        /// </summary>
        private void Awake()
        {
            if (Instance != null)
            {
                return;
            }
            Instance = this;

            SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged;

            DontDestroyOnLoad(gameObject);
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }