Help Problems restarting a scene. How to restart a scene correctly?..onReadyObservable does not work

Using the playground to try to do demo a restart brings added issues because of the overarching code that runs the playground code.

The issue here IMHO is that restarting is not a Babylon.js issue as such. It is a question of variable scope, logic and Javascript and just applying this thinking leads to this example. This is one way to achieve a restart.

Click green button to change the scene, red button to restart

github code

3 Likes