Pills and literals
Read and edit compact GET values, inline literals, composite values, and object references.
On this page
The small value shapes do most of the quiet work. A pill reads something that already exists; a literal supplies a value directly to an unwired pin.
The problem
Section titled “The problem”A patrol speed may come from _patrolSpeed, while a comparison threshold may be the number 0. Drawing both as full statement cards would hide the method under plumbing. Round Trip keeps reads compact and lets direct values sit where they are used.
When to reach for it
Section titled “When to reach for it”Use a GET pill for a field, property, local, this, or static reference. Use an inline literal when an eligible input has no wire and the value belongs at that call or expression. Use the project object picker for Unity object references instead of typing an asset name.
A member read off a call’s result is a member GET pill on the call’s return wire. However deep the chain, it stays one pill: collision.GetContact(i).normal.y is a GetContact call whose return wire feeds a pill reading y, with normal, the member it passes through, in the small label above it.
See it
Section titled “See it”A GET pill takes the color of its output type and can feed several consumers. A literal sits on an unwired input row. A hollow pin means the input has no wire and no value yet.
An input declared object, such as the message of Debug.Log, accepts any value, so it wears the color of what arrives: the type of the wired output, or of the literal or object typed into it. Only the color follows. The declared type still decides what you can wire, which literal editor appears, and what Compile writes.
-
Open a method with repeated reads. Follow each compact GET pill to the cards that consume it.
-
When several consumers read the same source value, Round Trip may consolidate them into one pill with several outgoing wires. Right-click that pill and choose Split Pins to place independent reads beside their consumers.
-
Find an eligible unwired input and click its literal area. Enter a scalar value such as a number, bool, string, char, or enum member. Invalid text remains visibly invalid until corrected.
-
For
Vector2,Vector3,Vector4, and other supported composite values, edit the component holes together. An unset component remains distinct from zero. -
For a Unity object reference, open the picker from the input. It filters project objects to assignable types and stores the selected asset identity. The two icons at the end of the field act on the current reference: reveal in the project window pings the asset in Unity’s Project window, and clear to none empties the reference as one undoable edit. Alt-click (Option-click on macOS) on the pin label also reveals the asset.
-
Connect a compatible output wire to the input. The literal editor disappears because the wire now supplies the value. Break the wire and the eligible inline state returns.
What it writes
Section titled “What it writes”A wired pin uses the connected expression. An unwired literal writes the literal held by that pin. GET pill consolidation changes presentation only, not the repeated reads implied by the source.
When it goes wrong
Section titled “When it goes wrong”When it goes wrong
| Symptom | Check | Fix |
|---|---|---|
| The literal box is missing. | Look for a wire entering the pin or for a pin type that is not eligible for inline entry. | Break the wire to restore inline entry, or connect a compatible value source. |
| A pin is hollow. | Confirm that it has neither a wire nor an accepted literal. | Enter a value or connect a compatible output before Compile. |
| Split Pins is disabled. | Count the effective outgoing wires from the GET pill. | The action needs at least two consumers. Add another use or leave the read consolidated. |
| The object picker shows no matches. | Read the input type and the selected asset type. | Choose an assignable project object, or leave the reference unset until the asset exists. |
- Variables: create the GET and SET nodes behind these reads and writes.
- Layout, reroutes, and comments: arrange repeated reads clearly.
- Get and set: follow member reads into assignments.