Is SceneLoader.ImportMesh not async?

I was checking the docs for SceneLoader.Import mesh and at around here I found Importmesh. I was very confused when I saw the ImportMeshAsync below it because I thought that ImportMesh was already async, especially since it requires a network request, and you can use a callback function as a parameter. Is it just that ImportMeshAsync returns a promise while with ImportMesh you just specify a callback, and they’re both technically async?
There’s probably something I’m missing? :stuck_out_tongue:

Thanks, Edwin

Hey and welcome :slight_smile:

you are right they are both asynchronous. The difference is that all functions ending with xxAsync will return a promise instead of using a callback in the parameters.

Does it make sense?

1 Like