Pause
Pauses the looping animation on the referenced wire without clearing it.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor.GraphVisualization
- Assembly: UnityEditor
Pause(WireReference)
Pauses the looping animation on the referenced wire without clearing it.
public void Pause(WireReference wire)
Parameters
The wire on which to pause the animation.
Remarks
Freezes the flow animation at its current segment offset while keeping the wire's customization (dashed pattern, width, opacity) applied. Call GraphMotion.Play again on the same wire to resume the animation at the requested speed. If you pause a wire that has no active animation there is no visible effect.
Examples
WireReference wire = context.GetWireReference(outputPortID, inputPortID);context.Motion.Play(wire);// Pause the animation; call Play again to resume.context.Motion.Pause(wire);
Pause(NodeReference)
Pauses the looping animation on the referenced node's accent without hiding it.
public void Pause(NodeReference node)
Parameters
The node on which to pause the animation.
Remarks
Freezes the looping animation at its current state and keeps the accent bar visible on the node. Call GraphMotion.Play again to resume the animation at the requested speed. If you pause a node that has no active animation there is no visible effect.
Examples
NodeReference nodeRef = context.GetNodeReference(nodeID);context.Motion.Play(nodeRef, animationSpeed: 1f);// Pause the animation; call Play again to resume.context.Motion.Pause(nodeRef);