I want to make an editor script that will generate gameobject prefabs out of all models in a specified directory.
I got the menu GUI all setup, but I'm not sure how to do the logic. Specifically, cycling through all models in a directory (including child directories).
I'm guessing there's a method to get all assets in a directory, but I don't know hot to specify only models. I assume I could at least load all assets in a directory and then check if they have mesh renderer components. I just don't know what method that would be to get all assets in a directory, and haven't had any luck finding it.
Also what type of asset would model files be? (Imported .blend, .fbx, etc) I guess GameObject?
↧