WebGL Mujoco Unity #1969
Replies: 1 comment
-
Hello! WebGL builds usually have a limitation of not being able to use external libraries (such as dll files). However, since MuJoCo's source code is written in C/++, I believe it would be possible to include it in your project and make a build for browsers that way. Of course if you do include the source code in your project, and intend to distribute it please be aware of MuJoCo's license T&Cs. For reference: However, I suspect some changes to the plugin would be needed to support in-project compilation of MuJoCo, (e.g. changing the DllImport calls in the bindings according to the guidance in the Unity docs for referencing internal C/++ libraries) Having support for this would be a nice feature! It is not available now, but I intend to investigate this later on (not this month). If you are interested in trying to implement this on your own, the first step would be to confirm you can compile a hello-world from C in Unity, then move the relevant MuJoCo source code into your project, and finally to update the bindings (using compiler directives to select the right call based on whether you are running things from editor, making a desktop build or a WebGL one). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, Mr Balint-H
I'm a student and I'm trying to put mujoco model into unity and build WebGL, I'm now able to synchronize the behavior of Mujoco with the Unity model using mjremote. But when I build WebGL, there are some abnormal behavior.
Here is a screenshot , illustrating my question:
NullReferenceException: Failed to create Mujoco runtime.

DllNotFoundException: Unable to load DLL 'mjplugin155'. Tried the load the following dynamic libraries:
it may be a simple question,but I've been stuck for a long time and hope you help me solve it. I would be grateful for your answer.
Beta Was this translation helpful? Give feedback.
All reactions