diff --git a/HauntedModMenu/Plugin.cs b/HauntedModMenu/Plugin.cs index cf6ad21..442a19d 100644 --- a/HauntedModMenu/Plugin.cs +++ b/HauntedModMenu/Plugin.cs @@ -20,24 +20,22 @@ public class HauntedModMenuPlugin : BaseUnityPlugin private bool inRoom; private GameObject menuObject = null; - private void Awake() + private void Start() { - var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HauntedModMenu.Resources.font"); - if (stream == null) - return; + // usage of Awake() now locks the game up on boot so we need this to be in Start now :( + var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HauntedModMenu.Resources.font"); + if (stream == null) + return; - var fontBundle = AssetBundle.LoadFromStream(stream); - if (fontBundle == null) - return; + var fontBundle = AssetBundle.LoadFromStream(stream); + if (fontBundle == null) + return; - Utils.RefCache.CustomFont = fontBundle.LoadAsset("ShortBaby"); + Utils.RefCache.CustomFont = fontBundle.LoadAsset("ShortBaby"); - fontBundle.Unload(false); - } + fontBundle.Unload(false); - private void Start() - { - foreach(BepInEx.PluginInfo plugin in Chainloader.PluginInfos.Values) { + foreach (BepInEx.PluginInfo plugin in Chainloader.PluginInfos.Values) { BaseUnityPlugin modPlugin = plugin.Instance; Type type = modPlugin.GetType();