diff --git a/BoneSync/Patching/ButtonTogglePatches.cs b/BoneSync/Patching/ButtonTogglePatches.cs index e254857..e3e5653 100644 --- a/BoneSync/Patching/ButtonTogglePatches.cs +++ b/BoneSync/Patching/ButtonTogglePatches.cs @@ -88,7 +88,7 @@ namespace BoneSync.Patching [HarmonyPatch(nameof(UnityEvent.Invoke)), HarmonyPrefix] private static bool InvokePrefix(UnityEvent __instance) { - //int hash = __instance.GetHashCode(); + if (!CallPatchedMethods.allowPatchedMethodCall) return true; UnityEventPatch patch = UnityEventPatch.TryGetPatch(__instance); if (patch != null) {