Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

New Variable window reference

A detailed description of each of the properties of the New Variable window.
Read time 1 minuteLast updated 2 days ago

Use the New Variable window to set up a new variable to use with your Logic script.

Property

Description

Scope
Decide how visible your variable is to other methods in your Logic. For more information, refer to Scope dropdown.
Unique NameGive your variable a name that's easy to identify. Use descriptive names (e.g., “Door_anim” for a door’s animation).
TypeChoose what kind of data your variable holds. For example, numbers, words, an object etc.
Default valueSet the initial value of your variable. This property only shows when you set Type to Bool, Float, Int, String, Vector3, or Vector2.

Scope dropdown

Option

Description

LocalOnly available inside a single method. Disappears when the method finishes.
GlobalAvailable throughout your Logic script as long as the GameObject exists. Default.

Type dropdown

Option

Description

ObjectReference to a GameObject in your scene
BoolTrue/False (on/off)
FloatDecimal number
IntWhole number
StringText
Vector3/Vector2Position or direction in 3D/2D space
ColorColor value
TransformPosition, rotation, and scale info
ColliderBox, Capsule, Sphere, Mesh Collider
RigidbodyPhysics properties
Camera, Light, Material, UI Transform, Canvas, Button, Text, InputField, Animation, Image, Quaternion, Logic(Specialized references for UI and scene elements)