Skip to main content
Version: Next (dev)

Key Nodes

The nodes you will actually use, grouped by what you are trying to do. There are hundreds of nodes in the palette; these are the two dozen that appear in almost every script.

Node titles in the palette often contain {...} placeholders — these are filled in from the node's own settings. Get {Name} shows as Get pushforce once you set its Name property.

React to something

Every script starts at an entry point. These have an outgoing execution pin but no incoming one. See Entry Points and Events for the full set.

NodeFires
OnSimulationStartedOnce, when the scene starts simulating
UpdateOnce per frame
On<Message>When that message reaches this object — e.g. OnMsgTriggerTriggered

Store and read values

Add variables in the script's properties panel first (deselect all nodes to see them). Tick Expose to make a variable editable per-instance in the editor.

NodeTitleWhat it does
GetVariableGet {Name}Reads a variable. No execution pin — evaluated when needed
SetVariableSet {Name} = {Value}Writes a variable
IncVariable++ {Name}Adds one
DecVariable-- {Name}Subtracts one

Make a decision

NodeTitleWhat it does
BranchThe if node. One Condition input, True and False execution outputs
Compare{A} {Operator} {B}Compares two values, outputs a bool. Operator is equal, not equal, less, less-equal, greater, greater-equal
CompareExec{A} {Operator} {B}Compare and branch in one node — True / False execution outputs
Select{Condition} ? {A} : {B}Picks one of two values without branching execution
IsValidTrue if the incoming object or component still exists. Use before acting on anything you looked up
SwitchStringSwitchMulti-way branch on text. One execution output per case, plus Default
SwitchInt64SwitchSame, on whole numbers
And / Or / Not{A} AND {B} etc.Boolean logic
tip

Branch needs a separate Compare feeding it. If you are only comparing two values and branching, CompareExec does both in one node.

Repeat something

All loop nodes have two execution outputs: LoopBody, which runs once per iteration, and Completed, which runs once at the end.

NodeTitleInputs / outputs
ForLoopForLoop [{FirstIndex}..{LastIndex}]Counts between two numbers. Outputs the current Index
WhileLoopRepeats while Condition is true
ForEachLoopWalks an array. Outputs Element and Index
ReverseForEachLoopThe same, backwards
BreakLeaves the loop early
warning

A While loop with a condition that never becomes false will hang the frame. If a loop might run long, put a Yield in its body so it spreads across frames.

Wait, and do things over time

NodeWhat it does
YieldPauses here, resumes next frame
StartCoroutineStarts a separate execution path that can outlive this frame
StopCoroutineStops one, by ID or by name
StopAllCoroutinesStops all of this script's coroutines
WaitForAnyWaits until any one of up to 16 coroutines finishes
WaitForAllWaits until all of them finish

Anything that waits turns its execution path into a coroutine. The entry point node shows a crossed-arrows icon when that happens.

Work with objects and components

NodeTitleWhat it does
TryGetComponentOfBaseTypeTryGet {TypeName}Finds a component on an object. Returns nothing if there isn't one — pair with IsValid
GetPropertyGet {Property}Reads a property from a component
SetPropertySet {Property} = {Value}Writes a property on a component
GetGlobalPositionWhere an object is in the world
FindChildByNameFinds a child object by name

GetProperty and SetProperty pick their type and property in the property grid, not through pins, so the node knows what kind of value to expect.

Tell something else to do something

Message nodes are generated from every message type in the project, so the exact list depends on what your project loads.

PatternExampleWhat it does
Send<Message>SendMsgPhysicsAddForceSends a message. Set the target with the GameObject or Component input
On<Message>OnMsgTriggerTriggeredEntry point — runs when that message arrives

Every Send node has a Send Mode setting:

  • Direct — deliver to the target object's components only.
  • Recursive — also deliver to all of its children.
  • Event — deliver upwards, to the nearest parent that handles this message.

It also has a Delay, so you can send something a second from now without a coroutine.

Maths

NodeTitle
Add{A} + {B}
Subtract{A} - {B}
Multiply{A} * {B}
Divide{A} / {B}
Expression{Expression} — a written formula with as many inputs and outputs as you define

These work on numbers and on vectors. Leave an input pin unconnected to type a constant into the property grid instead — that is how the jump pad scales its force.

Text, logging and seeing what happened

NodeWhat it does
String_FormatFormat {Text} — builds text from a pattern like Hit: {0} with as many parameters as you add
Draw3DTextPrints text in the world
DrawLineDraws a line between two points
DrawCrossMarks a point in space
Info / Warning / ErrorWrites to the log

Debug drawing is the fastest way to find out why a script is not doing what you expect. See the raycast recipe for the pattern.

Convert between types

Most number types convert automatically, and almost anything converts to text. You need explicit conversion mainly when handling a Variant — a value whose type is not known ahead of time.

NodeWhat it does
ToFloat, ToInt, ToBool, ToString, …Convert to a specific type
Variant_ConvertToConvertTo {Type} — converts a Variant, with Succeeded and Failed execution outputs

Variant_ConvertTo is the only conversion node that can fail visibly, which is why it branches. The rest convert silently.

Working with arrays

Thirteen array nodes exist. The ones worth knowing:

NodeWhat it does
MakeArrayBuilds an array from a list of values
GetCountHow many elements
IsEmptyTrue if empty
Array_GetElementGetElement[{Index}]
PushBackAppends an element
Array_ContainsContains {Element}

Pair them with ForEachLoop to walk the contents.

See Also