/// <summary> /// Attempts to remove all the Harmony patches that used our HarmonyId. /// </summary> internal static void RemoveHarmonyPatches() { try { // Removes all patches with this HarmonyId harmony.UnpatchAll(HarmonyId); } catch (Exception ex) { Plugin.Log?.Error("Error removing Harmony patches: " + ex.Message); Plugin.Log?.Debug(ex); } }
public static void Unload() { instance?.UnpatchAll(instance?.Id); instance = null; }