# Stop

> Stops all playing animations that were started with this Animation.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AnimationModule

## Stop()

Stops all playing animations that were started with this Animation.

```csharp
public void Stop()
```

### Remarks

Stopping an animation also Rewinds it to the Start.

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    Animation anim;

    void Start()
    {
        anim = GetComponent<Animation>();
    }

    void Update()
    {
        if (Input.GetButtonDown("Jump") && anim.isPlaying)
        {
            anim.Stop();
        }
    }
}
```

## Stop(string)

Stops an animation named name.

```csharp
public void Stop(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Remarks

Stopping an animation also Rewinds it to the Start.

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    Animation anim;

    void Start()
    {
        anim = GetComponent<Animation>();
    }

    void Update()
    {
        if (Input.GetButtonDown("Jump") && anim.isPlaying)
        {
            anim.Stop("CubeJump");
        }
    }
}
```
