Variables
The Numbers Within
Game Creator comes with a variables system that allows you to keep track of the game progress and save the state between play sessions.

A variable is a value container with information that can be changed during gameplay.

There are different types of Variables:
Global Variables: Identified by a unique name.
Local Variables: identified by a unique name. Only affect one scene.
List Variables: An array of values accessed by index. Only affect one scene.
Anatomy of a Variable
A variable is has a name
that identifies it (for example: “shotgun ammo“) and a value
.
A variable can have different types of values, including character strings, numbers, booleans (on/off), Colors, Vector3, and references to Game Objects.
Not all variable types allow to save its state. For example, Game Objects can't be saved because they are a reference type, which Unity doesn't allow to serialize.
Last updated
Was this helpful?