Local Name Variables¶
Local Name Variables are variables identified by a unique string of characters that live inside a scene and can only reference objects that are contained inside this scene.
Creating a Local Name Variable¶
To create a Local Name Variable, right click on the Hierarchy Panel_ and select Game Creator → Variables → Name Variables. A new game object will appear with the Local Name Variables component. Alternatively you can also add this component to any existing game object.
Conflicting ID
Note that two Local Variables can't have the same unique ID. Otherwise they'll override each other's values. To generate a new unique ID, expand the ID field and click the "Regenerate" button.
Adding new entries¶
To add a new variable entry, type the name of the variable on the creation field and press enter (or click on the little [+] button).
The name of a variable can be modified, as well as its value type. The Value field als contains the starting value of this particular variable entry.
Save & Load
Vales can be saved between play sessions to later be restored when loading a game. Disabling the save option will make all variables keep the initial value as their starting value, even after loading a previously saved game.