Hi,
I want to output a list about all the prefabs in the project and the related .fbx files with custom editor.
But now I can only get FilterMesh.name and sharedMesh.name.
I realized that I can select the .fbx file via click here
[120647-微信图片-20180712172517.png*_|120647]
So I think it should be possible to get the information.
Here is the related code.I don’t think it is necessary but still paste here.
public void GetMeshList()
{
for (int i = 0; i < prefab_list.Count; i++)
{
GameObject _prefab = AssetDatabase.LoadAssetAtPath(prefab_path <em>+ "\\" + prefab_list*, typeof(GameObject)) as GameObject;*</em>
if (_prefab != null)
{
MeshFilter[] _mf = _prefab.GetComponentsInChildren();
for (int j = 0; j < _mf.Length; j++)
{
GameObject go = _mf[j].gameObject;
//mesh_list.Add(prefab_list*.ToString().Replace(“.prefab”,“”) + “=>” + mf[j].name);*
string str1 = _mf[j].name;
while (go.transform.parent!=null)
{
str1 = string.Concat(go.transform.parent.name + “=>” + str1);
go = go.transform.parent.gameObject;
}
mesh_list.Add(str1);
CalculateFinalData(_mf[j].sharedMesh, scale);
}
}
}
}
Thx!
*