How to show GUIs in game

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

I understand how to make GUIs with the appropriate nodes, but what’s the best way to show them in game? So far I’ve tried instancing the scene and then removing the instance when the player closes it but I was just wondering if there were some other ways to do it.

:bust_in_silhouette: Reply From: SIsilicon

I guess it depends on your preferences. How I do my GUI is that when the game loads, I have different GUI scenes all instanced at once. When one gets shown, all the others get hidden. It works pretty well for simple games, but if you have multiple ‘levels’ then you should have the appropriate GUI scene instanced in each ‘level’. And when that ‘level’ gets removed, so is the GUI inside it. With Godot’s node based hierarchy you have to think modular.