Add minimal ref ValueType type conversion into HarmonySupport

This commit is contained in:
y0soro committed 2026-05-06 03:15:21 +08:00
1 parent f03c8f4ae5
commit 97aa893287
1 file changed
+5 -1
@@ -459,8 +459,12 @@ internal unsafe class Il2CppDetourMethodPatcher : MethodPatcher
if (managedParamType.IsByRef)
{
// TODO: directType being ValueType is not handled yet (but it's not that common in games). Implement when needed.
var directType = managedParamType.GetElementType();
// blittable value type pointer, note that ref to boxed Il2CppSystem.ValueType wrapper is still not handled
if (directType.IsValueType)
return;
// TODO: directType being Il2CppSystem.ValueType is not handled yet (but it's not that common in games). Implement when needed.
variable = il.DeclareLocal(directType);