diff --git a/unity/Editor/Importer/MjImporterWithAssets.cs b/unity/Editor/Importer/MjImporterWithAssets.cs index 4713a9f8fb..a9a93184d6 100644 --- a/unity/Editor/Importer/MjImporterWithAssets.cs +++ b/unity/Editor/Importer/MjImporterWithAssets.cs @@ -152,6 +152,13 @@ private void ParseMesh(XmlElement parentNode) { parentNode.GetStringAttribute("name", defaultValue: string.Empty); var assetReferenceName = MjEngineTool.Sanitize(unsanitizedAssetReferenceName); var sourceFilePath = Path.Combine(_sourceMeshesDir, fileName); + + if (Path.GetExtension(sourceFilePath) == ".obj") { + throw new NotImplementedException("OBJ mesh file loading is not yet implemented. " + + "Please convert to binary STL. " + + $"Attempted to load: {sourceFilePath}"); + } + var targetFilePath = Path.Combine(_targetMeshesDir, assetReferenceName + ".stl"); if (File.Exists(targetFilePath)) { File.Delete(targetFilePath);