Fix passing boxed reference values to managed thunk and properly unbox non-POD structures

This commit is contained in:
Wojtek Figat
2023-04-18 15:54:54 +02:00
parent 589941d6b2
commit 8b2d3db3f1
3 changed files with 41 additions and 28 deletions

View File

@@ -626,7 +626,7 @@ namespace FlaxEngine.Interop
return ManagedHandle.ToIntPtr(handle);
// HACK: Get the address of a non-pinned value
return ValueTypeUnboxer.GetPointer(value);
return ValueTypeUnboxer.GetPointer(value, type);
}
[UnmanagedCallersOnly]