API Docs for:
Show:

gs Module

A storage for different kind of game variables. The following scopes for variables exist:

  • Local Variables -> Only valid for the current scene.
  • Global Variables -> Valid for the whole game but bound to a single save-game.
  • Persistent Variables -> Valid for the whole game indepentent from the save-games.

The following data-types exist:

- Strings -> Variables storing text data. - Numbers -> Variables storing integer number values. - Booleans -> Variables storing boolean values. (Called "Switches" for easier understanding) - Lists -> Variables storing multiple other variables. Lists can also contain Lists.

Local variables are stored by scene UID. For each scene UID a list of local variables is stored.

Global and persistent variables are stored and a specific domain. A domain is just a unique name such as com.example.game for example. The default domain is an empty string. Domains are useful to avoid overlapping of variable numbers when sharing content with other users.

This module provides the following classes: