public static void OnStartup() { try { Persistent.Load(); Access.Initialize(); Textures.Initialize(); IntegrationManager.Initialize(); CompatibilityManager.Initialize(); } catch (System.Exception exception) { var info = new ExceptionInfo(exception); Error("RimHUD was unable to initialize properly due to the following exception:\n" + info.Text); State.Activated = false; Harmony.UnpatchAll(); } }