Variables

Variables are key to creating game logic, and recording the player's progress.  They can be of the type:

  • Bool - A True/Fase flag
  • Integer - A whole number
  • Float - A number with a decimal point
  • String - A line of text
  • Pop Up - One of a set of pre-defined labels

Variables can be stored in three places:

  • Global - Game-wide, and can be accessed at any time
  • Local - Scene-wide, and can be accessed at any time in a given scene
  • Component - As part of a GameObject, which can be prefabbed