Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Editor Script: Getting all the models in a folder.

$
0
0
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?

Viewing all articles
Browse latest Browse all 215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>