Loading Screen not working?

I’ve noticed the Loading Screen doesn’t work anymore since last update. Could anyone help me?
This is what I’ve been using and it used to work:
https://playground.babylonjs.com/#2NQFG0

Seems to work - Loading Screen | Babylon.js Playground (babylonjs.com), there was just no reason to show the loading screen

Oh, I see. And how could I hide it when scene ready?

It used to do that automatically when scene was loaded.

If you load an asset, it will show and hide the loading screen correctly. When did it stop working?

I mean that the Loading Screen hides after a certain time. But I want to hide when scene is ready loaded.

setTimeout(() => {
        scene.getEngine().hideLoadingUI();
    }, 3000)

I was referring to this sentence. When did it do it automatically, and when did it stop? that’s a breaking change (if functionality has changed without our intension), and we can’t sleep whenever something like that happens. And since we love sleeping, we want those solved.

You can use the scene.isReady() or scene.whenReadyAsync to check if the scene is ready, and then hide the loading screen.

Ok, I found the problem. If I’m using BABYLON.SceneLoader.Append before having anything in the scene, the Loading UI doesn’t show, but if I put the code after creating a sphere, it works?
https://playground.babylonjs.com/#2NQFG0#5

Also, I don’t need to add any scene.getEngine().hideLoadingUI(); and it still automatically hides when scene is ready.

2 Likes

Hello @a_bolog just checking in, are you still having issues?

No more issues now, thanks.

Solution: Wait to add pending data to the scene before loading screen logic by carolhmj · Pull Request #12785 · BabylonJS/Babylon.js · GitHub

3 Likes