Skip to content
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

Missing a .meta file for the mujoco.dll in the unity plugin #1146

Open
elysia-best opened this issue Oct 30, 2023 · 4 comments · May be fixed by #1154
Open

Missing a .meta file for the mujoco.dll in the unity plugin #1146

elysia-best opened this issue Oct 30, 2023 · 4 comments · May be fixed by #1154
Assignees
Labels
bug Something isn't working Unity Unity plug-in

Comments

@elysia-best
Copy link

I'm using MuJoCo and Unity on Windows 11. However, when I imported the package via git in the Unity editor, it promoted that the mujoco.dll does not have a .meta file and is ignored.

After I create a .meta file for mujoco.dll manually, the plugin loads successfully.

So, I think it is better to add .meta files for the runtime libraries.

@elysia-best elysia-best added the bug Something isn't working label Oct 30, 2023
@elysia-best
Copy link
Author

Or, it is better to create a meta file for the library while copying the library during the installation process.

@Balint-H
Copy link
Collaborator

How you describe it is one way to do it, although the copied files may disappear from the package folder if the project needs to reimport the git package. The way I usually handle this is to copy the mujoco DLL straight to my Project (somewhere in the Assets folder).

To better support git based installations, maybe the install instructions could be updated with this approach?

Alternatively, maybe including the dll and meta file in the package itself could be appropriate. Or is including a dll like that not good practice?

@elysia-best
Copy link
Author

elysia-best commented Nov 1, 2023

How you describe it is one way to do it, although the copied files may disappear from the package folder if the project needs to reimport the git package. The way I usually handle this is to copy the mujoco DLL straight to my Project (somewhere in the Assets folder).

To better support git based installations, maybe the install instructions could be updated with this approach?

Alternatively, maybe including the dll and meta file in the package itself could be appropriate. Or is including a dll like that not good practice?

Including a dll file in the repo doesn't seem to be a very well practise, although it is convenient for users to import. Doing so will lead to the increment of the repo's size at every update, as the dll is a binary file.

As indicated in the document, "On Unity version 2020.2 and later, the Package Manager will look for the native library file and copy it to the package directory when the package is imported." But the Package Manager will only copy the library file itself, not creating the .meta file at the same time. I think this will be the major problem.

P.S. I use Unity 2020.3.48f1c1. I'm not sure whether on higher version of Unity this issue will occur or not. I imported the package using "Add Package from Git URL" command in the Package Manager and entered the URL, https://github.com/google-deepmind/mujoco.git?path=/unity#3.0.0

Therefor, the install instructions should be updated to indicate this.

@elysia-best
Copy link
Author

I already open a pr to fix the problem.

@kevinzakka kevinzakka added the Unity Unity plug-in label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unity Unity plug-in
Projects
None yet
4 participants