Feature request Could we make the load function from assetsManager compatible with await?



I’m not sure if I’m making it right or not but how can we use async await with this ?
I tried it be it makes my code not working.

Is this implemented or will it ask some work to be done ?


The scene loader is async await compatible (Promise based),
Maybe that is what you are looking for?



I’m not sure I could use completely this.

Internally I use addMeshTask & addMeshTask to load every assets I have.


I can definitely add some promises on the AssetsManager.
Do you want something like that?

await assetManager.loadAsync()
1 Like

That would be perfect !


Would you be kind to open an issue on our repo detailing all the xxxAsync functions you would like on the AssetsManager?

I could work on it this week


Sure, here is the issue : Feature Request - make assetsManager await compatible · Issue #5937 · BabylonJS/Babylon.js · GitHub

I’m not sure we would need more async function from the assetManager.


I will work on that already :slight_smile:


How does it work?
I dont succeed to get it to run here:


Woot! this is a big bug!!! I’ll fix it for net nightly

Thanks for the heads up!


thanks :smiley: