mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-12 00:32:47 +08:00
backport: workaround VRCSDK bug
https://feedback.vrchat.com/sdk-bug-reports/p/string-conversion-errors-from-runtimeassemblygetcodebase-with-japanese-locale-an
This commit is contained in:
parent
46bc69e1d9
commit
096cf3555d
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82d775febe2a4f5eb435d5ac455132db
|
||||
timeCreated: 1726269002
|
Loading…
Reference in New Issue
Block a user