Thoughts about a menu? How would you...?

I’m working on a menu with several different tabs. I’ve put the mock-up of the menu and all the components the different tabs lead to as hidden objects on a hidden layer. The player opens the main menu, it shows the hidden layer/Main Menu components, they press a tab, it hides Main Menu components and shows the objects relating to that tab, etc.

My question is, assuming most of the time people open a game, they are not going to be opening every tab of a main menu - for instance how often do players really open Help/FAQ or Settings - does it make more sense not to include the components for each tab in the scene unless the user presses the tab, and then create them on the spot?

What do you think/know about the performance of this? Is it better performance to have all the tab components in the scene but hidden when the game starts, to leave them all out unless a player uses them - then create them and keep them there, to leave them all out unless a player uses them, then create them and delete them when the menu is closed, or are all options roughly the same?

The simplest solution (for me) is just laying them out in the scene editor and having them there when the game opens. I also wonder if doing it this way is overall for the best, sort of like how we declare variables so that even if they’re never used in that game, the game is prepared for them (or whatever the reason is). Just wondering how others approach this.

I favour having the clickable tabs on one layer and create a layer for each menu tab. Then it’s a simple matter of hiding or showing a tab’s layer as a tab is clicked.

Alternatively, the menu tab’s layout could be controlled with the use of external layouts. If you place them on a tab content layer it would make deleting them easy - just put all menu tabs into an object group and delete the object group on the tab content layer.

1 Like

Thanks for the reply MrMen, I want to get this all sorted out before I go too far in setting up the menu logic.