From 6d15bea492ef0d35fb834bbf023f34a1c38f540d Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Wed, 22 May 2019 16:23:46 -0500 Subject: [PATCH] Added note that OnApplicationStart and OnApplicationQuit may not be called because of enabling/disabling --- BSIPA-ModList/Plugin.cs | 9 +++++---- .../PluginInterfaces/BeatSaber/IBeatSaberPlugin.cs | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/BSIPA-ModList/Plugin.cs b/BSIPA-ModList/Plugin.cs index aaa3a2cd..105cf324 100644 --- a/BSIPA-ModList/Plugin.cs +++ b/BSIPA-ModList/Plugin.cs @@ -24,6 +24,11 @@ namespace BSIPA_ModList Logger.log = logger; IPA.Updating.BeatMods.Updater.ModListPresent = true; + + // Load resources ahead of time + MarkdownView.StartLoadResourcesAsync(); + + SharedCoroutineStarter.instance.StartCoroutine(LoadPluginIcons()); } public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) @@ -36,10 +41,6 @@ namespace BSIPA_ModList public void OnApplicationStart() { - // Load resources ahead of time - MarkdownView.StartLoadResourcesAsync(); - - SharedCoroutineStarter.instance.StartCoroutine(LoadPluginIcons()); } private static IEnumerator LoadPluginIcons() diff --git a/IPA.Loader/PluginInterfaces/BeatSaber/IBeatSaberPlugin.cs b/IPA.Loader/PluginInterfaces/BeatSaber/IBeatSaberPlugin.cs index 6b613ee0..96936c94 100644 --- a/IPA.Loader/PluginInterfaces/BeatSaber/IBeatSaberPlugin.cs +++ b/IPA.Loader/PluginInterfaces/BeatSaber/IBeatSaberPlugin.cs @@ -11,6 +11,8 @@ namespace IPA { /// /// Gets invoked when the application is started. + /// + /// THIS EVENT WILL NOT BE GUARANTEED TO FIRE. USE Init OR INSTEAD. /// void OnApplicationStart();