diff --git a/AssemblyUnhollower/UtilGenerator.cs b/AssemblyUnhollower/UtilGenerator.cs index 74fe812..4d8f283 100644 --- a/AssemblyUnhollower/UtilGenerator.cs +++ b/AssemblyUnhollower/UtilGenerator.cs @@ -67,6 +67,7 @@ public static void EmitObjectStore(this ILProcessor body, TypeReference original var classPointerFieldRef = new FieldReference(nameof(Il2CppClassPointerStore.NativeClassPtr), imports.IntPtr, classPointerTypeRef); body.Emit(OpCodes.Ldsfld, enclosingType.NewType.Module.ImportReference(classPointerFieldRef)); body.Emit(OpCodes.Ldc_I4_0); + body.Emit(OpCodes.Conv_U); body.Emit(OpCodes.Call, imports.ValueSizeGet); body.Emit(OpCodes.Cpblk); body.Emit(OpCodes.Pop); diff --git a/ReleaseChangelog.md b/ReleaseChangelog.md index d2bef37..bebd0b5 100644 --- a/ReleaseChangelog.md +++ b/ReleaseChangelog.md @@ -1,5 +1,5 @@ This is a small bugfix update. Generated assemblies should be fully compatible with those generated by 0.4.17.x. New features: - * Fixed compatibility with Unity versions 2021.2.0 and above - \ No newline at end of file + * Fixed compatibility with Unity versions 2021.2.0 and above + * Fixed setters of non-blittable-value-type non-generic fields having invalid IL