Looking at the code i'm not sure if I can fix the problem:Could not load type 'EntityStateChange' from assembly 'BEPUphysics, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 20 that is incorrectly aligned or overlapped by a non-object field.
Code: Select all
//TODO: Not a particularly elegant buffering mechanism. Make a better in-order buffering scheme.
//There are platform requirements on layout that cause issues with the WINDOWS explicit version.
//TODO: There's probably a better way to handle it on the XBOX/WP7 than the "give up" approach taken below.
#if WINDOWS
[StructLayout(LayoutKind.Explicit)]
internal struct EntityStateChange
{
[FieldOffset(0)]
internal Quaternion orientationQuaternion;
[FieldOffset(0)]
internal Vector3 vector;
[FieldOffset(16)]
internal TargetField targetField;
[FieldOffset(20)]
internal Entity target;
}
#else
internal struct EntityStateChange
{
internal Quaternion orientationQuaternion;
internal Vector3 vector;
internal TargetField targetField;
internal Entity target;
}
#endif