I need to pass a large array of values from objective-c to unity C#
I suspect the first step is to cast the byte* array or int* array into a const char* array so it can be passed to UnitySendMessage.
It’s the unity side I’m wondering about. It gets a “string” object passed to it. Reading up on the string class it looks like it’s built by copying the characters out of the utf8 array passed to it’s ctor. I then want to decode it back into characters so I can then cast them as numbers. A bit worried about that.
Alternatively, can I just pass a pointer from the unmanaged code to the managed code? That seems optimal. Any advice appreciated.