struct in Unity.GraphToolkit.Editor.GraphVisualization
Identifies a node inside a visualization NodeReference.Context so visualization changes can be applied to it.
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.
Additional resources: NodeReference.Context, Context.GetNodeReference
// 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);
| Property | Description |
|---|---|
| Context | Visualization context that produced the current node reference. |
| FillAmount | The progress fill amount displayed on the referenced node's accent bar, expressed as a percentage. |
| NodeID | Unique identifier of the node this reference points to. |
| Method | Description |
|---|---|
| ClearCustomization | Clears all customization previously applied to the referenced node, removes any fill amount, and stops any looping animation. |
| Equals | Indicates whether the current NodeReference is equal to another NodeReference. |
| GetHashCode | Returns a hash code for the current NodeReference. |
| Operator | Description |
|---|---|
| operator != | Compares two NodeReference values for inequality. |
| operator == | Compares two NodeReference values for equality. |