I can export .obj file with MDLAsset, but it without .mtl file. How can I export the .mtl file at the same time?
How to export .obj file with .mtl File in ARKit?
Locally when I export a MDLAsset as .obj, the .mtl file was placed in the same output directory. As well, when I opened the .obj I could see mtllib test.mtl that pointed to the emitted material filename.
Does the asset you export actually have materials? You can iterate all your sub-meshes and print out the MDLMaterial to verify. Does the emitted obj file contain references to the material usemtl? Does the file contain a reference to the material file via mtllib?