- Home /
Question by
Mathius777 · May 21, 2015 at 09:43 PM ·
unity 5javascriptfbx
Loop through all meshes in fbx
I have a FBX file in my editor that contains multiple meshes created in Modo. I want to be able to loop through all the items contained in this mesh and extract out each mesh. I am using a naming convention so that I know what a mesh is based on the name.
I cannot seem to figure out how to loop through the FBX at all in my editor. When I use the following code:
Mesh mesh = (Mesh)AssetDatabase.LoadAssetAtPath("Assets/Game/Meshes/Walls/FINALTEST.lxo", typeof(Mesh));
mesh is always "Frame", which is the name of a single mesh in my .lxo. Any ideas how I can loop through all the items in this so that I can see which are meshes and extract them out into a prefab?
Thank you.
Comment