-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MarshalDirectiveException: cannot marshal type System.Single[,] for Android/Oculus #65
Comments
I have created a workaround. I changed SimpleInletScaleObject.cs, so that instead of it saying I then edited LSL.cs at line 640, (the pull_chunk variable that uses float[,])
LSL.cs had the function "lsl_pull_chunk_f" edited as well at line 1115:
This has fixed the error with marshaling/sending data that uses [,] to Android/Oculus, while being sure to convert it back to a 2D array for Unity to handle. This only works for floats[,] but doing it to the int[,] and double[,], etc should be similar. I uploaded as a .txt file if anyone wants to take a look at them. |
When built as an APK (Oculus Pro), the SimpleInletScaleObject.cs script throws an error:
MarshalDirectiveException: cannot marshal type System.Single[,]
.It works fine in the editor as well as PC VR, but standalone version will cause the issue.
I've narrowed it down to SimpleInletScaleObject.cs, Line 35:
uint res = dll.lsl_pull_chunk_f(inlet.obj, data_buffer, timestamp_buffer, (uint)data_buffer.Length, (uint)timestamp_buffer.Length, timeout, ref ec);
The same occurs for the other sample scenes provided by LSL's samples (as of 1.16.0)
I assume this may be more of an issue with Android, but I thought it would be good to bring it to your attention, just in case.
The text was updated successfully, but these errors were encountered: