GUI for switching between scenes and getting back?

Hello, its me again with my rookie questions :melting_face:

This time I have created a “Main menu” type of scene containing three buttons. Each button triggers a scene. And each scene then has a “Back to Main menu” button.
My way of doing is probably very inefficient and I have double triggering going on when checking the console. My goal is to have a scalable Main menu that triggers up to, say 10, different scenes, all which should have a “Back to Main menu” button.

Can anyone help me with how to achieve the functionality of my PG but more efficiently? At least how I can do to get rid of the double triggering when going between the scenes and the main menu.

Main menu for three scenes | Babylon.js Playground (babylonjs.com)

To start off you can simplify it like this, to have several selectable scenes:

3 Likes

Incredible, it looks and works great! Thank you for your effort.

1 Like