Is it possible to run the unity OptiTrack plugin in unity il2cpp. I'm getting marshalling errors.
Before diving deeper I just want to know or if I need to do something in particular. Mono works fine, but that is not an option for me.
Code: Select all
NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. The method we're attempting to marshal is: NaturalPoint.NatNetLib.NatNetClient::FrameReceivedNativeThunk
I've tried making the client.cs methods static as per the errors message and it builds but crashes on enabling the component.
Code: Select all
internal class MonoPInvokeCallbackAttribute : System.Attribute
{
public MonoPInvokeCallbackAttribute() { }
}
[MonoPInvokeCallback]
static private void FrameReceivedNativeThunk( IntPtr pFrameOfMocapData, IntPtr pUserData )
{
Regards Thomas