- Home /
Import mesh with submeshes from OBJ?
I'm trying to export an OBJ file from 3ds max with 3 submeshes. I have:
assigned them all different material ID's
given a multi-sub material to the object
named all the submaterials
checked the "export materials" checkbox in the export dialog
However, when I attach a script that shows me how many submeshes are in the object, it still says 1
code:
void Start () {
Debug.Log(mesh.subMeshCount);
}
result:
1
What am I doing wrong here?
Answer by MartinGebske · Aug 16, 2018 at 06:32 AM
Despite this question is a bit older... But I don't think obj supports submeshes. Use .fbx instead.
Answer by TallPaulUK · Nov 18, 2020 at 03:20 PM
Obj supports submeshes if you include the associated .mtl file
If you don't include this file then it will merge the meshes into one.
Your answer
![](https://koobas.hobune.stream/wayback/20220613140556im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Importing .obj from Maya - mesh invariably called "default" 2 Answers
Reimport destroyed .obj file submeshes? 0 Answers
Why does Unity set imported mesh/animation scale to 0.01? 8 Answers
(C4d R 10.5) Importing in Unity one mesh with multiple materials problem. 0 Answers
turning import renderer off 1 Answer