Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

NodeReference

struct in Unity.GraphToolkit.Editor.GraphVisualization

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Identifies a node inside a visualization NodeReference.Context so visualization changes such as fill amount and progress can be applied to it.

Obtain a NodeReference from Context.GetNodeReference. The reference is only meaningful for the NodeReference.Context that produced it. Two NodeReference values are equal when they share the same NodeReference.NodeID and refer to the same NodeReference.Context instance.

 // 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
Context The visualization context that produced this 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.

Public Methods

Method Description
ClearCustomization Clears all customization previously applied to the referenced node, removes any fill amount, and stops any looping animation.
Equals Indicates whether this NodeReference is equal to another NodeReference.
GetHashCode Returns a hash code for this NodeReference.

Operators

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