Get and set
Read values with GET pills and change them with SET nodes placed and wired on the canvas.
On this page
Reading a value and changing a value look different on the canvas. A read is a small rounded pill that sits beside the node using it. A write is a navy SET node on the white wire.
What it does
Section titled “What it does”A GET pill brings a value onto the canvas: a variable of this class, a parameter, a local, a value on another object, or a static value such as a constant. It has no white pins, so it never takes a place in the running order; the value is read when a node uses it. Its color is the value’s type color, and its wire carries that color to every pin it feeds.
A SET node stores a new value. It sits on the white wire, so it runs at a definite moment, and the new value arrives on its Value pin. Because every change is a node on the white wire, following that wire shows you every place the method changes something.
When to use it
Section titled “When to use it”Use a GET pill whenever a node needs a value that already exists: the coin count for a HUD call, the player’s speed for a movement node, the enemy’s health for a comparison. Use a SET node when the game should remember something new: add to the score, mark a coin as collected, store the player’s new velocity, flag a door as open.
Some values can be read and not written. A property that only hands out a value has no SET route, and its rows show set grayed out with the reason Read only. Properties normally belong in Variables. A property that calculates an answer or runs behavior in an accessor appears under Methods instead; merely having get and set does not move it there. Properties: Variables or Methods? explains the distinction with GameMaster screenshots and small code examples.
A local whose type row in the type chooser is var takes its type from the first SET that fills it. Every GET and SET node for that local then shows the type that first SET gave it. A field never offers var.
How to use it
Section titled “How to use it”Read and write values
Open a method
Open a method canvas with at least one node on the white wire, such as the magenta entry node of a new method.
Drag a variable
Drag a row, such as
_coins, from the Variables list in the left rail onto empty canvas. A small menu opens with get and set rows named after the variable, for example get _coins and set _coins.
2 stepsFull size ↗Choose get
Click get. A rounded pill appears with one output pin on its right.
Place a SET
Drag a second copy of the same row onto the canvas and click set. A navy SET node appears.
3 stepsFull size ↗Connect the execution wire
Drag from the last node on the white wire (its Exec pin on the right) to the SET node’s left Exec pin. A white wire joins them.
2 stepsFull size ↗Supply the value
Give the SET its new value. Drag a colored wire into Value from a pill, a parameter pin on the entry node, or another node’s result. Or click the empty area beside Value and type a literal such as
0.
2 stepsFull size ↗Read an object's member
To read a value on another object, drag that object’s pill output pin onto empty canvas. In the menu of its members that opens, pick a member (here,
_hudofferstransform.position.x), then click get for a pill wired from the object, or set for a SET node whose Target pin is already wired to it.
2 stepsFull size ↗Walk from the Variables rail
Drag a variable that holds an object, such as
_hud, from the Variables list. The menu asks one level at a time: pick a member, then the next, using back to to step out, and click get or set when you reach the value you want. The clip walks_hudthroughtransform,position, andx.
5 stepsFull size ↗Find a static value
For a static value, such as a constant declared on another class, right-click empty canvas and type its name. Read a static value walks through it.
2 stepsFull size ↗Give the write a useful value and compile
To copy the threshold into the count instead of writing
_coinsback to itself, drag_coinsToUnlockfrom Variables, choose get, and wire its output into the_coinsSET’s Value. Then press Compile in the toolbar.
6 stepsFull size ↗
You can also place both from the action menu. Right-click empty canvas and the variables and local variables groups list every value with get, set, and name of buttons. Or right-click a row in the Variables list and choose Create Get Node or Create Set Node. name of places a GET pill wired into a small node that produces the variable’s name as text, for a message or a log line.

Read a static value
Section titled “Read a static value”A static value belongs to a type instead of an object: a constant such as LevelRules.DefaultMoveSpeed, a static readonly field, or a static property such as Keyboard.current or Time.time. No variable of this class holds it, so it is not in the Variables list.

Debug.Log(LevelRules.DefaultCoinUnlockThreshold);.Read a static value
Open the action menu
Right-click empty canvas.
Search for a value
Type at least three letters of the member’s name, the type’s name, or both with a dot between, such as
DefaultMove,LevelRulesorLevelRules.Default.Choose the row
Click the row. A GET pill appears where you right-clicked.
Use the value
Drag from the pill’s output pin into the pin that uses the value, such as a call’s argument.
2 stepsFull size ↗Compile the read
Press Compile in the toolbar.
Start from the right-click: dragging a node’s input pin onto empty canvas places nothing. A placed pill keeps its spot when you switch methods or Unity reloads, wired or not.
Compile writes the pill inside the node it feeds, as the type’s name and the member’s name joined by a dot. When the script already has a using line for the type’s namespace, the short type name is enough; otherwise the type is written with its namespace. Compile never adds a using line. Door in the Platformer reads the keyboard this way: its Update method opens with var keyboard = Keyboard.current;.
What it writes
Section titled “What it writes”If you also work in C#, this is what is written into the script. These lines sit in a short ShowPickup helper on PlayerController in the Platformer sample. The first line is the HUD call from CollectCoin. The other lines are short illustrations: a member SET, a name of node, and a var local filled by its first SET, here from the sample’s GetVelocity() helper.
A pill is never a line of its own. It is written inside whatever node it feeds.
When it goes wrong
Section titled “When it goes wrong”When it goes wrong
| Symptom | Check | Fix |
|---|---|---|
| The set button is grayed out with read only | Select the variable and read its Declaration and Storage cards in the right rail: it may be a property with no setter or a field that cannot be changed. Inside a static method, a variable of the object itself cannot be written either. | Choose a value that can be written, or the variable that stores it. |
| The member menu stops offering deeper members | Count the steps in the walk: it goes four members deep. | Pick get or set at the current step. |
| A static value shows a type you did not expect | Read the type name before the dot on the static value's row, and the namespace on the line under it. | Pick the row whose type and namespace are the ones you want. |
| No static value appears in the list | Count the letters in search: static values are searched from three. A last row reading building index means the project is still being read, and no source file means the class has no script to search from. | Type more of the name, wait for building index to clear, or open a class backed by a script. |
| The list ends with showing … of many; keep typing to narrow | The search reads at most 200 matching static values and shows the best forty rows, so the value you want may be past the end. | Type more of the name, or add the type and a dot, such as LevelRules.Default. |
| A static value you can see in C# is missing | The menu lists the static fields and properties this class can read. A private member of another class is not listed. An obsolete member is listed after every other match, and one hidden from IntelliSense only when Show hidden members is on in Preferences. | Make the member reachable from this class, or type more of its name. |





