From 6f158b8f892b91a827af01e19cf12cda87761229 Mon Sep 17 00:00:00 2001 From: js6pak Date: Wed, 15 Feb 2023 04:59:35 +0100 Subject: [PATCH] Fix constructors in non-blittable structs (#77) --- Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs b/Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs index 38d09455..54af00cc 100644 --- a/Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs +++ b/Il2CppInterop.Generator/Passes/Pass50GenerateMethods.cs @@ -66,7 +66,7 @@ public static void DoPass(RewriteGlobalContext context) if (nextInstruction != null) bodyBuilder.Append(nextInstruction); - if (!originalMethod.DeclaringType.IsValueType) + if (typeContext.ComputedTypeSpecifics != TypeRewriteContext.TypeSpecifics.BlittableStruct) { if (originalMethod.IsConstructor) {