Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NodeReference

Identifies a node inside a visualization NodeReference.Context so visualization changes can be applied to it.
Read time 1 minuteLast updated 6 days ago

Definition

public readonly struct NodeReference : IEquatable<NodeReference>

Remarks

Obtain a NodeReference from Context.GetNodeReference. The reference is only meaningful for the NodeReference.Context that produced it. You can use its properties to set, retrieve, or clear customization for that specific node in the graph canvas. Two NodeReference values are equal when they share the same NodeReference.NodeID and refer to the same NodeReference.Context instance.

Examples

// Obtain a reference to a node by its GUID, then drive its visual state.using Context context = Registry.CreateVisualizationContext(graphGuid);NodeReference nodeRef = context.GetNodeReference(nodeID);// Show a half-filled accent bar on the node.nodeRef.FillAmount = 50f;// Replace the static fill with a looping progress animation.context.Motion.Play(nodeRef, animationSpeed: 1f);// Stop the animation. The bar remains visible at the previously set fill amount.context.Motion.Stop(nodeRef);

Properties

Property

Description

ContextVisualization context that produced the current node reference.
FillAmountThe progress fill amount displayed on the referenced node's accent bar, expressed as a percentage.
NodeIDUnique identifier of the node this reference points to.

Methods

Method

Description

ClearCustomizationClears all customization previously applied to the referenced node, removes any fill amount, and stops any looping animation.
EqualsIndicates whether the current NodeReference is equal to another object.
GetHashCodeReturns a hash code for the current NodeReference.

Operators

Operator

Description

operator ==Compares two NodeReference values for equality.
operator !=Compares two NodeReference values for inequality.