Variables
The Numbers Within
Last updated
Was this helpful?
The Numbers Within
Last updated
Was this helpful?
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:
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.
: Identified by a unique name.
: identified by a unique name. Only affect one scene.
: An array of values accessed by index. Only affect one scene.
Variables can also be accessed through code. Head to to know more.