You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was discovered in Magicphysx. Here is the original Rust code and the currently generated C# code, it does not ensure the consistency of the struct's memory layout.
[StructLayout(LayoutKind.Sequential)]publicunsafepartialstructPxContactModifyPair{publicfixedbyte/* PxRigidActor, this length is invalid so must keep pointer and can't edit from C# */actor[2];publicfixedbyte/* PxShape, this length is invalid so must keep pointer and can't edit from C# */shape[2];publicfixedbyte/* PxTransform, this length is invalid so must keep pointer and can't edit from C# */transform[2];publicPxContactSetcontacts;}
I believe the following generated code would be more appropriate.
In this case, if we directly pass the C# struct to native code, it will also produce the correct result and we can directly operate on the members of the returned structure from native.
This issue was discovered in Magicphysx. Here is the original Rust code and the currently generated C# code, it does not ensure the consistency of the struct's memory layout.
I believe the following generated code would be more appropriate.
The text was updated successfully, but these errors were encountered: