I'm trying to load some of my 3d models in my assets with formats such as .FBX or .OBJ into my script;
Typically I've used:
string[] guids = AssetDatabase.FindAssets(filter, foldersToSearch);
List a = new List();
foreach (var t in guids)
{
string path = AssetDatabase.GUIDToAssetPath(t);
a.Add(AssetDatabase.LoadAssetAtPath(path));
}
but unfortunately, it loads the entire object like all the children layers materials and every other thing separately; then gives me an array of Object that includes an object with apartment layers.
I want to get each .FBX or .OBJ as one Object or GameObject; I was wondering if there's a solution to my problem.
↧