RhinoCompute can run in Android?

I want to run Compute.Rhino3d at android device, but is it possible?

I was going to run Compute.Rhino3d in OculusQuest (It works in android) which application maked in Unity, but did not get along well.
When I use Rhino3dmIO.Desktop, It worked well on Unity and no error, but did not work in Quest.

So I changed dll file to use into a Rhino3dmIO.Android from a Rhino3dmIO.Desktop, Because a sample appears for Windows by this document ( Rhino Compute Service (Windows)) which I referred to.
However, I did not get along well.

Regards

1 Like

Sorry, I’m not familiar with development for Oculus Quest. Is this an android OS?

Yes.

I made RhinoInside VR application working on Windows. It is used HTC VIVE (see movie).
So next time, I try to make the stand-alone VR application that used RhinoCompute working on OculusQuest.
I seem to be able to make it somehow if RhinoCompute works in android.

1 Like

I am also trying to get rhino3dmIO to build to oculus quest via unity and having build errors.

First error it gave was:

ArgumentException: The Assembly System.Drawing.Common is referenced by Rhino3dmIO.Android (‘Assets/Plugins/Rhino3dmIO.Android.dll’). But the dll is not allowed to be included or could not be found.

Adding system.drawing.common through nuget for unity fixed that one, but then next error that came up:

ArgumentException: The Assembly Mono.Android is referenced by Rhino3dmIO.Android (‘Assets/Plugins/Rhino3dmIO.Android.dll’). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse

Has anyone found a solution for the problem that RhineCompute cannot be connected via Rhino3dmIO.Android on the OculusQuest? I’ve been trying for weeks without success, but failing because Rhino3dmIO.Android is apparently not compatible with JSON.net for Unity. Same exception: The Assembly Mono.Android is referenced by Rhino3dmIO.Android (‘Assets/Plugins/Rhino3dmIO.Android.dll’). But the dll is not allowed to be included or could not be found.

If you have a contact at Unity, we can probably figure out a way to fix this. My guess is we need to make a special “Unity” compile, but I am not sure what that would amount to without chatting with a Unity dev first.

Thanks for your quick answer. A special compile of Rhino3dmlIO.Android for Unity would be great. Unfortunately I have no contact at Unity. But I don’t think it’s absolutely necessary. Because the component Rhino3dmIO for the desktop works perfectly - as Junichiro Horikawa describes in a video (https://www.youtube.com/watch?v=zUbm83ynn0Q). But as soon as you try to include Rhino3dmIO.Android the error comes. Even in an ‘empty’ project, just with JSON.net, librhino3dmio_native and RhinoCompute.cs, you get the exception when you try to include Rhino3dmIO.Android to start the build for Android.

If I am not mistaken, @SherifTarabishy has run Rhino.Compute in Android through Unity on an Occulus Quest: https://twitter.com/sheriftarabishy/status/1144376496406089728?s=20
Sherif, is this a correct assumption? If so, do you have any suggestions for getting this to work?

1 Like

If I’m not mistaken, this exception appears to be getting thrown by Unity. This exception phrasing makes me think that Unity is saying they are already referencing Mono.Android, so Rhino3dmIO.Android referencing it as well is the problem.

tbh I don’t remember exactly.

What I remember is, by using nuget.config and packages.config to add Rhino3dmIO.Android to the unity project, I kept getting a lot of errors. I think it turned out that a specific file was missing, this might have been resolved later I am not sure.

I think I created an empty Xamerin Android project on VS, added the nuget package, built the project, and then used all the files related to rhino that ended up in the bin in my unity project.

This was not on quest though, but I don’t think it should differ.
https://twitter.com/sheriftarabishy/status/1144376496406089728?s=20

I have more details about progress on this front I was able to make. I can gather some of the error logs and post them up here for ref sometime this week, but here’s the quick version for now:

If you switch the backend compiler in unity to (the now unsupported) 32bit ‘mono’ it builds fine but this is not ideal. I was able to get it to build successfully on 64bit ‘il2cpp’ backend compiler (ideal) but it spits out an error in the log whenever you try to access or do something with the dll at runtime. Following the trail of the error led me to believe it came up because the dll relies on xamerin/mono which relies on JIT compilation, il2cpp is strictly AOT compilation.