How to dynamically Import seperate meshes from a folder

Hi there,

This might be an easy question but I can’t seem to be able to get it to work.

I have a game that dynamically creates creatures from a set of bodyparts. We have separate files for each bodypart and I can load them separatly no problem.

Can I do this in a single ImportMesh statement though? All examples I find are about loading multiple Meshes from the same file, and not from multiple files.

Thanks!

Kind Regards,

Emiel

Not that I’m aware of, but you can just loop through an array of filenames, importing each or use AssetsManager and call addMeshTask() as many times as you need before calling load().

2 Likes