public void Initialize(IManager manager) { DontDestroyOnLoad(gameObject); Logger = LogManager.GetForCurrentAssembly(); Instance = this; Manager = manager; Config = new Config(); RegisterExportedTypes(); CreateSettingsMenu(); try { RuntimePatcher.AutoPatch(); RuntimePatcher.RunTranspilers(); } catch (Exception e) { Logger.Error("Failed to initialize harmony. Mods will still be loaded, but may not function correctly."); Logger.Exception(e); } }
public void Initialize(IManager manager) { InitializeSettings(); PrefabInitializer = new PrefabInitializer(); PrefabInitializer.HookUpEvent(); try { RuntimePatcher.AutoPatch(); } catch (Exception e) { Log.Error("Failed to initialize mix-ins. Mods will still be loaded, but may not function correctly."); Log.Exception(e); } try { RuntimePatcher.RunTranspilers(); } catch (Exception e) { Log.Error("Failed to initialize one or more transpilers. Mods will still be loaded, but may not function correctly."); Log.Exception(e); } SceneManager.sceneLoaded += InitializeTerminal; }