Docs
Blueprint API Reference
Every Blueprint node PipeIt exposes for runtime pipe editing.
This page explains every Blueprint node PipeIt ships at runtime. For the workflow they add up to, read Runtime Editing first.
All of the nodes live on the Pipe Graph Component (PIGraphComponent). The
Pipe Network actor exposes it as a read-only Graph Component property: get
the component from the actor, then call the nodes on it.
General contracts
A few rules apply across the whole API, so they are stated once:
- Runtime edits are gated. In game worlds, every mutating node is refused while the network’s Runtime Editable flag is off. Mutations that return an id return an invalid one; those returning a bool return false; the rest do nothing.
- Positions and directions are component-local for mutations and previews (transform world positions with the component’s transform first). Queries return world space (node locations and rotations).
- Failure is signalled, not asserted. An id that did not resolve returns zeroed
results (
Nonenode type, zero location); a rejected operation returns an invalid id or false. Check the return value rather than assuming success.
Core types
- PI Node Id (
FPINodeId): identifies a node with an Island Id plus a Node Id (two GUIDs). Every mutation that creates a node returns one; an all-zero id means failure. Edges have no id of their own; an edge is addressed by its two endpoint node ids. - PI Click Result (
FPIClickResult): what a world hit resolved to. Its Type says which fields are valid:Node(→ Node),Edge(→ Edge Node A / Edge Node B),FlexiEdge(→ Flexi Edge Id), orNone(the hit was not a piece of this network). - EPI Pipe Node Type:
EndCap,Straight,Corner,HalfCorner,TJunction,Cross,FlexiAnchor,Bracket, orNonefor an id that did not resolve. - EPI Graph Change Reason: carried by the On Graph Changed event.
TopologyChanged,TransformChanged,VariantChanged,FlexiEdgeChanged,FragmentImported, orUnknown.
Properties
| Property | Access | Meaning |
|---|---|---|
| Runtime Editable | read/write | The runtime-edit gate. Off by default so game code cannot modify level-authored pipes by accident. |
| Max Undo Depth | read/write | Cap on recorded undo entries (default 32, minimum 1). Oldest entries drop first. |
| Pipe Kit | via Get Pipe Kit / Set Pipe Kit | The kit asset used to render the network. |
| Render Mode | details panel / C++ only | Not writable from Blueprint. See the note in Runtime Editing. |
| Mesh Scale Multiplier | via Set Mesh Scale Multiplier | Uniform per-piece size multiplier, clamped to a small minimum. |
Resolving what the player hit
- Find Clicked Element (Hit) → PI Click Result: the one-call resolver. Give it a world-trace Hit Result and it returns the node, edge, or flexi edge that owns the hit component, in either render mode. This is the node to build interactions around; the two below are lower-level pieces of it.
- Get Node Id For Hit (Comp, Instance Index) → PI Node Id: resolves a hit mesh component to a junction or bracket node. Returns an invalid id for pipe meshes; those belong to an edge, so query the next node instead. Instance Index is the hit result’s Item (used in Instanced mode; ignored for per-piece components).
- Get Edge For Hit (Comp, Instance Index) → bool, Node A, Node B: resolves a hit pipe mesh to its edge’s endpoints. False for junction and bracket hits.
- Get Flexi Edge Id For Mesh Component (Mesh Component) → Guid: the flexi edge that owns a clicked spline mesh, or an invalid GUID.
Reading the network
- Get All Island Ids → Guid[] / Get Island Count → int: a network can hold several disconnected sub-graphs (islands).
- Get All Nodes → PI Node Id[] / Get All Nodes In Island (Island Id): every node, globally or per island.
- Get Node Neighbors (Node Id) → PI Node Id[]: the nodes connected through the node’s sockets. Empty for an unresolved id.
- Get All Flexi Edge Ids → Guid[]: every curved edge in the network.
- Get Node Location (Node Id) → Vector / Get Node Rotation (Node Id) → Rotator: world space; zero for an unresolved id.
- Get Node Type (Node Id) → EPI Pipe Node Type:
Nonewhen the id did not resolve. - Is End Cap (Node Id) → bool: the practical “can the player extend from here?” query.
- Is Flexi Anchor (Node Id) → bool: true for the endpoints of a curved edge.
- Get Gizmo Rotation (Node Id) → Rotator: the node’s natural gizmo basis (component-local). Useful for aligning your own move/rotate widgets to the pipe.
Previews
The Begin Preview nodes render a translucent ghost of exactly what the matching commit would produce. Call one per tick while the player aims; each returns false (and clears any previous ghost) when the operation would be rejected, so a stale ghost never lingers over an invalid position. They are refused on read-only networks, like the mutations they preview. None of them touch the committed state or the undo history.
- Begin Preview Upgrade (Node Id, Direction, Distance, New Cap Mesh Id) → bool: ghost of Upgrade, same component-local arguments. The optional New Cap Mesh Id renders the ghost’s new cap as a specific kit variant (invalid GUID = the kit default); if you pass one, apply the same variant after the commit with Set Node Mesh Id.
- Begin Preview Insert On Edge (Node A, Node B, Position) → bool: ghost of Insert Node On Edge.
- Begin Preview Insert Bracket On Edge (Node A, Node B, Position) → bool: ghost of Insert Bracket On Edge. The facing is derived internally the way the editor does it (a trace perpendicular to the pipe, falling back to local down), and the ghost renders with its arms pre-traced (lines and feet, not just the clamp). False when the kit has no bracket that fits the edge.
- Clear Preview State: removes the ghost. Call it when the player stops aiming and before committing.
Editing operations
All of these record undo entries in game worlds and fire On Graph Changed on commit.
- Upgrade (Node Id, Direction, Distance) → PI Node Id: extends the network from a node along the component-local Direction by Distance, upgrading the node to the next junction type and capping the new end. Returns the new end cap’s id (chain from it to keep drawing), or an invalid id when rejected (bad node, spacing validation). The kit’s Get Default Edge Length provides a distance that always validates.
- Insert Node On Edge (Node A, Node B, Position, Camera Hint) → PI Node Id: splits an edge with a new junction at the component-local Position (projected onto the edge). Invalid id when there is not enough room between the neighbouring pieces. Camera Hint (optional) orients the inserted piece toward that component-local point.
- Insert Bracket On Edge (Node A, Node B, Position, Facing Direction, Camera Hint) → PI Node Id: mounts a bracket. Facing Direction is the component-local direction toward the surface the arms should reach; pass zero to fall back to local down. Arms are traced immediately on commit.
- Delete Node (Node Id) → bool: removes a piece and heals the run. False when the node cannot be deleted (for example, a deletion that would leave the graph invalid).
- Translate Node (Node Id, Delta): moves a node by a component-local delta, dragging its connected pipes with it. Batch per-tick calls (see Undo below).
- Rotate Node (Node Id, Angle Degrees, Axis): rotates a node around a component-local axis.
- Convert Corner To Flexi Pipe (Corner Node Id) → bool: replaces a corner with a smooth curved edge (see Flexi Pipes).
- Rebuild Graph / Rebuild Flexi Edges: full re-render of everything, or of the curved edges. Rarely needed: normal edits re-render incrementally.
Changing looks
None of these change topology; variant and roll changes still record undo.
- Get Mesh Variant Ids For Node (Node Id) → Guid[]: the kit variants valid for the node’s category, highest priority first. Pair with Set Node Mesh Id for a variant picker or cycler.
- Get Pipe Mesh Variant Ids → Guid[]: the kit’s pipe variants, for edges and flexi edges.
- Set Node Mesh Id (Node Id, Mesh Id): sets a junction’s mesh variant.
- Set Pipe Mesh Id (Node A, Node B, Mesh Id): sets an edge’s pipe variant.
- Set Flexi Edge Pipe Mesh Id (Edge Id, Mesh Id): the same for a curved edge.
- Set Edge Roll (Node A, Node B, Roll) / Get Edge Roll → float: the pipe’s rotation around its own flow axis, in radians. Purely visual.
- Set Straight Mesh Flipped (Node Id, Flipped) / Is Straight Mesh Flipped → bool: the 180° flip for asymmetric straight pieces (reducers, valves). No-op for other node types.
- Set Mesh Scale Multiplier (New Multiplier): per-piece size, independent of actor scale. Not recorded in undo.
- Set Pipe Kit (New Pipe Kit) / Get Pipe Kit: swaps the whole network’s kit and re-renders every piece. Variants that do not resolve in the new kit fall back to its defaults; the layout is untouched. Not recorded in undo.
- Get Default Edge Length → float (on the Pipe Kit asset): a component-local draw distance guaranteed to pass spacing validation for this kit.
Undo and redo
Runtime undo records automatically in game worlds; see Runtime Editing for what is and is not recorded.
- Undo → bool / Redo → bool: false when there is nothing to undo/redo (or the network is not editable).
- Can Undo → bool / Can Redo → bool: for greying out UI.
- Begin Undo Batch / End Undo Batch: coalesce everything in between into one entry. Wrap continuous gestures (a drag calling Translate Node per tick floods the history otherwise). Batches nest; the entry records when the outermost batch ends, and only if the state actually changed.
- Clear Undo History: drops both stacks (level reset, ownership change).
Saving and loading
- Export Graph → bool, Bytes: serializes the committed graph into a self-contained byte array, ready to store in a Save Game object.
- Import Graph (Bytes) → bool: replaces the committed graph. Fail-closed: bytes from a newer PipeIt version, or that fail validation, return false and leave the network untouched. Refused while Runtime Editable is off.
Mesh components and events
- On Graph Changed (Change Reason): assignable event; fires after every committed change (edits, undo/redo, imports), never for previews, and after the renderer has synced. Rapid changes during unsafe engine states (loading, saving) coalesce into a single broadcast with the latest reason.
- Get Junction Mesh Component (Node Id) → Static Mesh Component: the rendered component for a junction (a bracket resolves to its clamp).
- Get Pipe Mesh Components (Node A, Node B) → Static Mesh Component[]: an edge’s pipes. One stretched mesh, or cap + tiles + cap for tiled variants.
- Get Flexi Pipe Mesh Components (Edge Id) → Spline Mesh Component[]: a curved edge’s spline meshes.
Per-piece components exist on the Authoring render path (and under Auto for all-Nanite kits at runtime); in Instanced mode these return nothing. Components are recreated when their island changes, so re-resolve them from an On Graph Changed handler instead of caching them across edits.
Not exposed to Blueprint
Fine-grained control-point editing on flexi edges (insert / move / delete a control point, set tangents and interp modes) and deleting a whole flexi edge are currently C++-only. From Blueprint you can convert a corner to a curve, re-skin curves, and read their ids and components; shaping individual control points at runtime needs C++ today.