private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { if (ctInstalled == false) { if (arg0.name == "MenuCore") { ColorsUI.CreateSettingsUI(); } } }
public void OnApplicationStart() { ReadPreferences(); ColorsUI.CheckCT(); _colorInit = false; CustomSabersPresent = IllusionInjector.PluginManager.Plugins.Any(x => x.Name == "Saber Mod"); SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; SceneManager.sceneLoaded += SceneManager_sceneLoaded; }
public void OnApplicationStart() { ReadPreferences(); ColorsUI.CheckCT(); _colorInit = false; CustomSabersPresent = IllusionInjector.PluginManager.Plugins.Any(x => x.Name == "Custom Sabers") || IPA.Loader.PluginManager.AllPlugins.Any(x => x.Metadata.Id == "Custom Sabers"); SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; SceneManager.sceneLoaded += SceneManager_sceneLoaded; var harmony = HarmonyInstance.Create("CustomColorsHarmonyInstance"); harmony.PatchAll(Assembly.GetExecutingAssembly()); }