Saving and Loading a Global Variable?

I’m making a platformer game with levels that unlock when you beat the previous level, and I use Global Variables to do all of this. Is there a way to save the Global Variable, and then load that file when you boot the game?

Yes.

(See built-in “Save load” example or search this forum for lots of similar topics)

1 Like

You can use Storage to save & load data
For instance here I have a global variable to store the total kills of the game and a scene variable to store coins of the scene.

You first check if the value exists in Storage if not then assign a default value.
When you Read a value means that exists in Storage and then you assign that value to a scene variable and then assign the scene variable to your global variable.

2 Likes