private static void InstallHarmony() { Harmony = HarmonyInstance.Create("com.tpb.thememixer2"); Harmony.PatchAll(Assembly.GetExecutingAssembly()); if (IsModEnabled(672248733UL, "UltimateEyeCandy")) { UltimateEyeCandyPatch = new UltimateEyeCandyPatch(); UltimateEyeCandyPatch.Patch(Harmony); } }
private static void UnInstallHarmony() { if (Harmony == null) { return; } try { UltimateEyeCandyPatch?.Unpatch(Harmony); Harmony.UnpatchAll("com.tpb.thememixer2"); } catch (Exception e) { Debug.LogError(e); } finally { UltimateEyeCandyPatch = null; Harmony = null; } }