mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-06 14:45:06 +08:00
f7b12d7f82
... fixed by reimplementing ScaleAdjuster (again!)
42 lines
995 B
C#
42 lines
995 B
C#
#region
|
|
|
|
using System;
|
|
using HarmonyLib;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
#endregion
|
|
|
|
namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
|
|
{
|
|
internal class PatchLoader
|
|
{
|
|
private static readonly Action<Harmony>[] patches = new Action<Harmony>[]
|
|
{
|
|
HideScaleAdjusterFromPrefabOverrideView.Patch,
|
|
HierarchyViewPatches.Patch,
|
|
#if UNITY_2022_3_OR_NEWER
|
|
HandleUtilityPatches.Patch_FilterInstanceIDs,
|
|
PickingObjectPatch.Patch,
|
|
#endif
|
|
};
|
|
|
|
[InitializeOnLoadMethod]
|
|
static void ApplyPatches()
|
|
{
|
|
var harmony = new Harmony("nadena.dev.modular_avatar");
|
|
|
|
foreach (var patch in patches)
|
|
{
|
|
try
|
|
{
|
|
patch(harmony);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Debug.LogException(e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |