Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

Create a variable

Instructions on how to create a variable for your Logic script.
Read time 1 minuteLast updated 2 days ago

Create variables to store data that your Logic script can use and modify. Remember to assign any references after creating variables. To create a variable, use the following steps:
  1. Open your Logic script.
  2. Select the Add (+) icon next to Variables. The New Variable window appears.
  3. Change the settings to your preferences.
  4. Select Create.

Assign references

To set variable values:
  1. Select your GameObject that has your Logic attached. The Inspector panel shows.
  2. In the Inspector, find your Logic.
  3. Either set the variable value, or drag an object from the Hierarchy panel into the variable slot.