Sorry about the big title but what I’m trying to do is (or should be) quite simple, to get multiple results from one plugin call.
My plan was to use pointers, and I did a little test, with a scenario where it pulls both system time and the other player’s state in one call.
In the C# interface:
[DllImport ("__Internal")]
private static extern double _GetTime (IntPtr peerState);
public static double GetTime(IntPtr peerState)
{
if (Application.platform != RuntimePlatform.OSXEditor){
return _GetTime(peerState);
}else{
return 0;
}
}
In Objective C implementation:
double _GetTime(int* peerState)
{
*peerState = 5;
return [delegateObject getTime];
}
The code broke at the assignment line:
*peerState = 5;
Giving me:
Program received signal: “SIGBUS”.
Previous frame inner to this frame (gdb could not unwind past this frame)
Previous frame inner to this frame (gdb could not unwind past this frame)
Can anyone help me with this?? :shock: