예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 public static void Unload()
 {
     instance?.UnpatchAll(instance?.Id);
     instance = null;
 }