Cancel SceneLoader.Load


I am loading gltf files using SceneLoader.Load in a canvas that is part of a SPA app. In my app it is possible to switch between scenes while they are loading, I would like to cancel the Load event for one of the Scenes when loading the new one. Would it be possible to cancel/abort the Load event with SceneLoader to avoid loading 2 files?

Thank you for your help.

I think it is possible in GLTF, asking a friend to confirm @bghgary ?

If you loading a glTF, you can cancel the loading by disposing the loader.

Here is an example: Cancel loading a glTF | Babylon.js Playground (


Thanks a lot, I’ll try this out.

1 Like