Skip to content

Conversation

@myrodar
Copy link

@myrodar myrodar commented Dec 24, 2025

The Unity importer was rejecting uppercase .STL and .OBJ files (commonly used in mujoco_menagerie or unitree_mujoco) due to case-sensitive extension checks. Modified MjImporterWithAssets to use ToLower() when comparing file extensions, allowing both lowercase and uppercase variants.

System Used:

-MacOS 26.2
-Unity 6.3 LTS (6000.3.2f1) | Will work on Unity 2022.3 LTS and later
-MuJoCo 3.4.0 | Unity Plugin 3.4.0

Context:

I'm using the Unity plug-in for a personnel project and research while studying at UdeM. The Mujoco Plugin has no issues when running with Mj Object in the scene. But, while importing scene from major repo. For instance, I tried mujoco_menagerie with the unitree_g1 xml file. Same instance was happening with unitree_mujoco.

In those XML files, the meshes are importing as .STL files. On Mac, which is case-sensitive the files are not processed as binary STL, throwing errors "Type of mesh file not yet supported. Please convert to binary STL or OBJ. "

Fix:

-Added .toLowerInvariant() on line 156, 197 and 201 to fix this instance.

Notes: From my understanding of the contribution guidelines, this is a very simple fix, so I did not push precise test for this update. I made two different tests on two different Mac. If requires I have no problem to added small test on nunit.

… importer.

The Unity importer was rejecting uppercase .STL and .OBJ files (commonly used in mujoco_menagerie) due to case-sensitive extension checks. Modified MjImporterWithAssets to use ToLower() when comparing file extensions, allowing both lowercase and uppercase variants.
@google-cla
Copy link

google-cla bot commented Dec 24, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant