Unity Plugin " The type or namespace name... #2028
-
Beta Was this translation helpful? Give feedback.
Replies: 13 comments
-
The error messages you posted indicate issues in installing the plug-in. You can skip that step and manually place the folder in your Unity asset folder, provided you also fetch the binary and name it as expected (this is mentioned in the documentation IIRC). |
Beta Was this translation helpful? Give feedback.
-
After doing the install both ways I'm pretty confident I have the plugin installed correctly. I'm getting the same error after placing the folder into the assets folder manually. I've also tried importing the simple I don't know what you mean by naming it as expected. I haven't read anything in the Unity section that would imply naming a file by a specific name. I imported the hammock.xml and tried building with that and got the same error. Thank you so much for helping! I don't know what steps I've missed as the documentation doesn't mention much other than importing the plug in. |
Beta Was this translation helpful? Give feedback.
-
The binary needs to be renamed, search for the word "rename" in the Unity page in the docs. Try to load something even simpler than hammock -- I recommend the cartpole. |
Beta Was this translation helpful? Give feedback.
-
The only "renaming" suggested is for OSX and Linux. I'm on windows so no renaming is required when doing the manual approach. After deleting MujocoBinaryRetriever.cs I have new errors: There are almost 70 of these errors. It seems like it just can't find the files even though the unity folder is within the assets folder of the project. |
Beta Was this translation helpful? Give feedback.
-
Hello, those errors on build come up when the editor files are included in the build for your platform assembly file. Could you check the assembly file in the Editor folder, and see what platforms are enabled? Everything, except "Editor" should be disabled. This way all scripts that reference editor-only features will be ignored in the build. This was an issue in an earlier version of the plugin, but I thought it was fixed since then. Is it possible you are using an older version of the plugin? |
Beta Was this translation helpful? Give feedback.
-
I just downloaded this plug-in so it should be up to date. Which editor folder? I found one under... in mujoco.editor.asmdef I have nothing under Is there a different file I should be looking for? Thank you all for the help! I've been spending hours trying to figure out my issue. |
Beta Was this translation helpful? Give feedback.
-
Hello, it's at MuJoCo/Editor/Mujoco.Editor.asmdef. Could you send a screenshot of how that file looks in your inspector when you click on it in Unity? Its contents should be this (based on the file on the main branch):
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Interestingly its missing the editor only platform criteria. Adding it either in a text editor or through the Unity inspector should fix it for you. I'm not sure what could have changed it. If you do remember the steps you've taken to install could you detail them (starting with "open the MuJoCo repo on github)? I'd like to try to reproduce it and see what could have caused it. I have done something similar with the MPL hand (real time control and sensing) in Unity + MuJoCo so I think you are on a good path. Let me know if you have any other trouble setting up. |
Beta Was this translation helpful? Give feedback.
-
open the MuJoCo repo on github, click the green "<>code" icon, and then download zip. |
Beta Was this translation helpful? Give feedback.
-
And then you added the unzipped package via Unity's package manager and the package.json file in unity folder of the repo? |
Beta Was this translation helpful? Give feedback.
-
Yes exactly. |
Beta Was this translation helpful? Give feedback.
-
I was able to build and run the flag.xml as well as an old HAPTIX model we are hoping to utilize. Thank you both, I'm sure I'll be looking for help again. (Is this the best place to ask for help?) |
Beta Was this translation helpful? Give feedback.
I was able to build and run the flag.xml as well as an old HAPTIX model we are hoping to utilize.
Thank you both, I'm sure I'll be looking for help again. (Is this the best place to ask for help?)