How to have a permanent menu whatever the new scene loaded?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Edot

I want to create a simple 2D program that has a menu with several buttons, each showing a scene.
The tree structure is as follows:

MainScene
|SimpleMenu
|_Construct
|_Council

The menu works, and when I click on the buttons, the scene loads. But the SimpleMenu disappears. I want to keep it permanently, whatever the scene.
I specify that because of MainScene, all my scenes overlap. I used the visibility button to hide them, but I don’t know how to make them visible in a script.

How should I do it ? Is this the right organization?

I am a beginner, and I try to do it as simply as possible. Could someone shed some light on my lantern and give me some good research leads?

Thank you in advance.

:bust_in_silhouette: Reply From: EmanuelOzorio

I dont know if is possible, but you can search about add two scenes em the tree using get_tree() or something.

Also you can create the menu as a scene separated and put as an object on all scenes that you want to show the menu.

:bust_in_silhouette: Reply From: Skyfrit

You can set the SimpleMenu as Singletons.

https://docs.godotengine.org/en/stable/getting_started/step_by_step/singletons_autoload.html?highlight=autoload

This is exactly what I need. thank you so much :slight_smile:

Edot | 2020-11-19 14:19