Variables — What are they?

A variable is a box with information in it and you determine what is in the box. All variables need to be created/defined by the user in order to apply it in game.

3 required components for a variable:

  • Is it public or private — can anyone access it or only this script?
  • Data type — is it a string, int, float, char, bool
  • Needs a name — it needs to be identifiable/called

Other Data Types

  • Byte: is a value between 0 to 255; DateTime: exact date and time;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ