Changes in the main menu apply to gameplay

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

I am new to game dev so sorry if this is silly.
When i change costume to the character in the main menu, i want it to apply to the game when it starts. How can i do it?

:bust_in_silhouette: Reply From: njamster

Be aware that your question is very broad, so the answer will be as well: You need to store the information about which costume the character currently wears in a place that is accessible both from the main menu and the game scenes, e.g. a Singleton. If you want the information to persist across restarts, you might write it to a file as well. Now all you need to do is check this variable when the character is loaded and change it’s appearance accordingly. How exactly you do this, depends a great deal on which node(s) you are using for representing a costume.