internal static int Start() { if (!SupportModule.Initialize()) { return(1); } AddUnityDebugLog(); if (MelonLaunchOptions.Core.EnableBHapticsIntegration) { bHaptics.Start(); } if (MelonLaunchOptions.Core.EnableCompatibilityLayers) { MelonCompatibilityLayer.SetupModules(MelonCompatibilityLayer.SetupType.OnApplicationStart); } MelonHandler.OnApplicationStart_Plugins(); MelonHandler.LoadMods(); MelonHandler.OnApplicationStart_Mods(); MelonHandler.OnApplicationLateStart_Plugins(); MelonHandler.OnApplicationLateStart_Mods(); return(0); }
private static int Initialize() { AppDomain curDomain = AppDomain.CurrentDomain; Fixes.UnhandledException.Install(curDomain); MelonUtils.Setup(curDomain); Assertions.LemonAssertMapping.Setup(); if (!MonoLibrary.Setup() || !MonoResolveManager.Setup()) { return(1); } HarmonyInstance = new HarmonyLib.Harmony(BuildInfo.Name); Fixes.ForcedCultureInfo.Install(); Fixes.InstancePatchFix.Install(); Fixes.ProcessFix.Install(); PatchShield.Install(); MelonPreferences.Load(); MelonLaunchOptions.Load(); bHaptics.Load(); MelonCompatibilityLayer.Setup(); MelonCompatibilityLayer.SetupModules(MelonCompatibilityLayer.SetupType.OnPreInitialization); MelonHandler.LoadPlugins(); MelonHandler.OnPreInitialization(); return(0); }
internal static int Initialize(ConfigFile configFile) { AppDomain curDomain = AppDomain.CurrentDomain; HarmonyInstance = new HarmonyLib.Harmony(BuildInfo.Name); if (MelonLaunchOptions.Core.EnableFixes) { Fixes.UnhandledException.Run(curDomain); Fixes.InvariantCurrentCulture.Install(); } try { MelonUtils.Setup(); } catch (Exception ex) { MelonLogger.Error($"MelonUtils.Setup Exception: {ex}"); throw; } if (MelonLaunchOptions.Core.EnableFixes) { Fixes.ApplicationBase.Run(curDomain); Fixes.ExtraCleanup.Run(); } MelonPreferences.Load(); MelonLaunchOptions.Load(configFile); if (MelonLaunchOptions.Core.EnableCompatibilityLayers) { MelonCompatibilityLayer.Setup(); } if (MelonLaunchOptions.Core.EnablePatchShield) { PatchShield.Install(); } if (MelonLaunchOptions.Core.EnableBHapticsIntegration) { bHaptics.Load(); } if (MelonLaunchOptions.Core.EnableCompatibilityLayers) { MelonCompatibilityLayer.SetupModules(MelonCompatibilityLayer.SetupType.OnPreInitialization); } MelonHandler.LoadPlugins(); MelonHandler.OnPreInitialization(); return(0); }
private static int Start() { if (!SupportModule.Setup()) { return(1); } AddUnityDebugLog(); bHaptics.Start(); MelonCompatibilityLayer.SetupModules(MelonCompatibilityLayer.SetupType.OnApplicationStart); MelonHandler.OnApplicationStart_Plugins(); MelonHandler.LoadMods(); MelonStartScreen.DisplayModLoadIssuesIfNeeded(); MelonHandler.OnApplicationStart_Mods(); return(0); }
static Core() { AppDomain curDomain = AppDomain.CurrentDomain; HarmonyInstance = new HarmonyLib.Harmony(BuildInfo.Name); Fixes.UnhandledException.Run(curDomain); Fixes.InvariantCurrentCulture.Install(); try { MelonUtils.Setup(); } catch (Exception ex) { MelonLogger.Error("MelonUtils.Setup Exception: " + ex.ToString()); throw ex; } Fixes.ApplicationBase.Run(curDomain); Fixes.ExtraCleanup.Run(); MelonPreferences.Load(); MelonLaunchOptions.Load(); MelonCompatibilityLayer.Setup(curDomain); //PatchShield.Install(); }
private static int Start() { bHaptics.Start(); MelonHandler.OnApplicationStart_Plugins(); MelonHandler.LoadMods(); MelonHandler.OnPreSupportModule(); if (!SupportModule.Setup()) { return(1); } if (MelonUtils.IsGameIl2Cpp()) { HarmonyLib.Public.Patching.PatchManager.ResolvePatcher += HarmonyIl2CppMethodPatcher.TryResolve; } MelonCompatibilityLayer.SetupModules(MelonCompatibilityLayer.SetupType.OnApplicationStart); AddUnityDebugLog(); MelonHandler.OnApplicationStart_Mods(); //MelonStartScreen.DisplayModLoadIssuesIfNeeded(); return(0); }