Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

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
    true
    or
    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.
Statements don’t return a value, they only perform actions.

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:
  1. Right-click on a node in the Logic Editor.
  2. Select Add Note.
  3. Enter the details of your note.
  4. 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:
  1. Navigate to the Variables panel.
  2. Select the Eye icon next to the variable you want to hide or show.
When a variable is hidden, it won’t appear in the Inspector panel when you select a GameObject with that Logic script attached.

Check for errors

If a socket has a red outline, it means that you need to fill the slot with another node or a variable. If you don’t fill it, you get an error message in the Bug Notifications panel when you run your application.