bd_ 2024-09-13 17:21:29 -07:00
parent 46bc69e1d9
commit 096cf3555d
3 changed files with 27 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
{
private static readonly Action<Harmony>[] patches = new Action<Harmony>[]
{
VRCSDKBug_AssemblyGetNameExceptionHandling.Patch,
HierarchyViewPatches.Patch,
#if UNITY_2022_3_OR_NEWER
HandleUtilityPatches.Patch_FilterInstanceIDs,

View File

@ -0,0 +1,23 @@
using HarmonyLib;
namespace nadena.dev.modular_avatar.core.editor.HarmonyPatches
{
internal static class VRCSDKBug_AssemblyGetNameExceptionHandling
{
internal static void Patch(Harmony h)
{
var t_Tools = AccessTools.TypeByName("VRC.Tools");
var p_HasTypeVRCApplication = AccessTools.Property(t_Tools, "HasTypeVRCApplication");
h.Patch(p_HasTypeVRCApplication.GetMethod,
new HarmonyMethod(typeof(VRCSDKBug_AssemblyGetNameExceptionHandling), nameof(AlwaysFalse)));
}
private static bool AlwaysFalse(ref bool __result)
{
__result = false;
return false;
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 82d775febe2a4f5eb435d5ac455132db
timeCreated: 1726269002