diff --git a/Il2CppInterop.Generator/Contexts/RewriteGlobalContext.cs b/Il2CppInterop.Generator/Contexts/RewriteGlobalContext.cs index aaf7acb9..bbf503f7 100644 --- a/Il2CppInterop.Generator/Contexts/RewriteGlobalContext.cs +++ b/Il2CppInterop.Generator/Contexts/RewriteGlobalContext.cs @@ -87,11 +87,12 @@ public TypeRewriteContext GetNewTypeForOriginal(TypeDefinition originalType) public TypeRewriteContext.TypeSpecifics JudgeSpecificsByOriginalType(TypeSignature typeRef) { - if (typeRef.IsPrimitive() || typeRef.IsPointerLike() || typeRef.FullName == "System.TypedReference") + if (typeRef.IsPrimitive() || typeRef is PointerTypeSignature || typeRef.FullName == "System.TypedReference") return TypeRewriteContext.TypeSpecifics.BlittableStruct; if (typeRef is CorLibTypeSignature { ElementType: ElementType.String or ElementType.Object } or ArrayBaseTypeSignature + or ByReferenceTypeSignature or GenericParameterSignature or GenericInstanceTypeSignature) return TypeRewriteContext.TypeSpecifics.ReferenceType;