mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-28 10:15:06 +08:00
chore: set harmony ID on UnpatchAll call
This commit is contained in:
parent
2c9939dea8
commit
4b9d1128c6
@ -11,6 +11,8 @@ namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
|
||||
{
|
||||
internal class PatchLoader
|
||||
{
|
||||
private const string HarmonyId = "nadena.dev.modular_avatar";
|
||||
|
||||
private static readonly Action<Harmony>[] patches = new Action<Harmony>[]
|
||||
{
|
||||
//HierarchyViewPatches.Patch,
|
||||
@ -19,7 +21,7 @@ namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
|
||||
[InitializeOnLoadMethod]
|
||||
static void ApplyPatches()
|
||||
{
|
||||
var harmony = new Harmony("nadena.dev.modular_avatar");
|
||||
var harmony = new Harmony(HarmonyId);
|
||||
|
||||
foreach (var patch in patches)
|
||||
{
|
||||
@ -33,7 +35,7 @@ namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
|
||||
}
|
||||
}
|
||||
|
||||
AssemblyReloadEvents.beforeAssemblyReload += () => { harmony.UnpatchAll(); };
|
||||
AssemblyReloadEvents.beforeAssemblyReload += () => { harmony.UnpatchAll(HarmonyId); };
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user