Scene changing with script in autoload for main game menu

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yeppo
:warning: Old Version Published before Godot 3 was released.

Hi,

I am working on my very first game menu and bumped into scene changing via a global script in autoload when reading the documentation.

I’m now wondering whether or not this is the best way to develop various menu categories such as: options, credits, multiplayer, singleplayer, skirmish, …

Is there a better way? Is the use of autoload usually frowned upon? And how can one refactor their design to avoid using autoload?

:bust_in_silhouette: Reply From: eons

For options or sub-menu, I may suggest using Popup panels or Panels that show and hide, all the time on the tree, these won’t use many resources and people may want accessible quickly anyway.

Depending on the panel content you may want to make the panels to handle its own children, removing them from the tree if needed.

I’m not fan of singleton (even if autoload is not exactly that) and really bad making UI so take this with a grain of salt ^^;