Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

GraphMotion.Stop

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

Declaration

public void Stop(WireReference wire);

Parameters

Parameter Description
wire The wire on which to stop the animation.

Description

Stops the looping animation on the referenced wire.

Throws ArgumentException when wire doesn't correspond to a wire in the current Context.

Stop a flow animation that was previously started on a wire using <see cref="Unity.GraphToolkit.Editor.GraphVisualization.GraphMotion.Play" />.

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

Declaration

public void Stop(TransitionReference transition);

Parameters

Parameter Description
transition The transition on which to stop the animation.

Description

Stops the looping animation on the referenced transition.

Throws ArgumentException when transition doesn't correspond to a transition in the current Context.

Stop a flow animation that was previously started on a transition using <see cref="Unity.GraphToolkit.Editor.GraphVisualization.GraphMotion.Play" />.

 TransitionReference transitionRef = context.GetTransitionReference(transitionID);
 context.Motion.Stop(transitionRef);

Declaration

public void Stop(NodeReference node);

Parameters

Parameter Description
node The node on which to stop the animation.

Description

Stops the looping animation on the referenced node's accent and hides it.

If a fill amount has been set on the node (either via NodeReference.FillAmount or via the node model's FillAmount property), the bar remains visible at that fill amount instead. Throws ArgumentException when node doesn't correspond to a node in the current Context.

 NodeReference nodeRef = context.GetNodeReference(nodeID);
 context.Motion.Play(nodeRef, animationSpeed: 1f);
 // Later, stop the animation.
 context.Motion.Stop(nodeRef);

Declaration

public void Stop(StateReference state);

Parameters

Parameter Description
state The state on which to stop the animation.

Description

Stops the looping animation on the referenced state's accent and hides it.

If a fill amount has been set on the state (either via StateReference.FillAmount or via IState.FillAmount), the bar remains visible at that fill amount instead. Throws ArgumentException when state doesn't correspond to a state in the current Context.

 StateReference stateRef = context.GetStateReference(stateID);
 context.Motion.Play(stateRef, animationSpeed: 1f);
 // Later, stop the animation.
 context.Motion.Stop(stateRef);