Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Play

Starts a looping animation on the referenced wire.
Read time 1 minuteLast updated 6 days ago

Definition

Play(WireReference, float)

Starts a looping animation on the referenced wire.
public void Play(WireReference wire, float animationSpeed = 1)

Parameters

The wire on which to play the animation.

animationSpeed

Speed multiplier for the animation. Higher values move the animated segment faster.

Remarks

Start a flow animation on a wire to highlight an active data path through the graph at the default speed.

Examples

WireReference wire = context.GetWireReference(outputPortID, inputPortID);context.Motion.Play(wire);

Play(NodeReference, float)

Starts a looping animation on the referenced node's accent.
public void Play(NodeReference node, float animationSpeed = 1)

Parameters

The node on which to play the animation.

animationSpeed

Speed multiplier for the animation. Higher values move the animated segment faster. The default value is 1.

Remarks

The animation loops indefinitely until you call GraphMotion.Stop or GraphMotion.Pause. While the animation plays, the accent bar overrides any fill amount previously set through NodeReference.FillAmount or the node model's
FillAmount
property. Call GraphMotion.Play again on the same node after GraphMotion.Pause to resume the animation at the new speed.

Examples

NodeReference nodeRef = context.GetNodeReference(nodeID);context.Motion.Play(nodeRef);