mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-21 13:45:03 +08:00
https://feedback.vrchat.com/sdk-bug-reports/p/string-conversion-errors-from-runtimeassemblygetcodebase-with-japanese-locale-an
23 lines
698 B
C#
23 lines
698 B
C#
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;
|
|
}
|
|
}
|
|
} |