Nodes
Use nodes to create the logic and behaviors for your GameObjects.
Read time 2 minutesLast updated 2 days ago
Nodes are the building blocks of Lite Logic in Unity Lite. Each node represents a specific action, condition, or value in your Logic script. Drag nodes into your Logic script from the Node Library panel, and connect it to other nodes to create the desired behavior.
Node types
There are multiple types of nodes in Unity Lite that perform different tasks.Node shapes
Nodes come in two main shapes - round and square. Each node shape represents a different concept in the Logic Editor.Round nodes: Expressions
Round nodes are expressions. An expression is something that produces a value. This value can be a number, a color, a GameObject, a true/false result, or any other piece of data. Expressions don’t perform actions, they only give you information or a value you can use. Use expressions when you need to calculate, retrieve, or provide information that another element of your Logic script needs to use. The following are examples of expression-type nodes:- Outputs the number .
5
- Gets the position of an object.
- Checks if the user presses a button and returns or
true
.false
Square nodes: Statements
Square nodes are statements. A statement is an instruction that performs an action or causes something to change in your scene. You can use statements to move an object, start an animation, enable/disable a GameObject, and more. The following are examples of statement-type nodes:- Moves an object to a new position.
- Plays an animation.
- Enables or disables a UI element.
Tips for using nodes in the Logic Editor
Use notes
Use notes to explain your logic to teammates or remind yourself what each part does. To add a note:- Right-click on a node in the Logic Editor.
- Select Add Note.
- Enter the details of your note.
- Click anywhere outside the note to save it.
Hide variables
You can change the visibility of variables you don’t want anyone to edit in the Inspector. For example, you might want to hide variables that are only used internally in your Logic script to set a specific color or value. To change a variable's visibility:- Navigate to the Variables panel.
- Select the Eye icon next to the variable you want to hide or show.