# Stop

> Stops the looping animation on the referenced wire.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor.GraphVisualization](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization.md)
* **Assembly:** UnityEditor

## Stop(WireReference)

Stops the looping animation on the referenced wire.

```csharp
public void Stop(WireReference wire)
```

### Parameters

**** (\[WireReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference)): The wire on which to stop the animation.

### Remarks

Throws ArgumentException when `wire` doesn't correspond to a wire in the current [Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/context.md).

Stop a flow animation that was previously started on a wire using [GraphMotion.Play](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/graphmotion/play.md).

### Examples

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

## Stop(TransitionReference)

Stops the looping animation on the referenced transition.

```csharp
public void Stop(TransitionReference transition)
```

### Parameters

**** (\[TransitionReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/transitionreference)): The transition on which to stop the animation.

### Remarks

Throws ArgumentException when `transition` doesn't correspond to a transition in the current [Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/context.md).

Stop a flow animation that was previously started on a transition using [GraphMotion.Play](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/graphmotion/play.md).

### Examples

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

## Stop(NodeReference)

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

```csharp
public void Stop(NodeReference node)
```

### Parameters

**** (\[NodeReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference)): The node on which to stop the animation.

### Remarks

If a fill amount has been set on the node (either via [NodeReference.FillAmount](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference/fillamount.md) 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](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/context.md).

### Examples

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

## Stop(StateReference)

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

```csharp
public void Stop(StateReference state)
```

### Parameters

**** (\[StateReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/statereference)): The state on which to stop the animation.

### Remarks

If a fill amount has been set on the state (either via [StateReference.FillAmount](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/statereference/fillamount.md) or via [IState.FillAmount](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/fillamount.md)), the bar remains visible at that fill amount instead. Throws ArgumentException when `state` doesn't correspond to a state in the current [Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/context.md).

### Examples

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