# GetParameter(int)

> Obtains a reference to the AnimatorControllerParameter at the given index.

## Definition

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

```csharp
public AnimatorControllerParameter GetParameter(int index)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the parameter to obtain.

### Returns

| Type                                                                                                      | Description                       |
| --------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [AnimatorControllerParameter](/engine/6000.5/script-reference/unityengine/animatorcontrollerparameter.md) | The parameter at the given index. |

### Remarks

Throws an `IndexOutOfRangeException` when the index is not in the range from greater than or equal to 0 to less than [Animator.parameterCount](/engine/6000.5/script-reference/unityengine/animator/parametercount.md).

```csharp
using UnityEngine;

// This example demonstrates how to use the Animator.GetParameter method to get information about the parameters of an Animator controller.
[RequireComponent(typeof(Animator))]
public class GetParameterExample : MonoBehaviour
{
    Animator m_Animator;

    void Start()
    {
        m_Animator = GetComponent<Animator>();

        for (var i = 0; i < m_Animator.parameterCount; i++)
        {
            var parameter = m_Animator.GetParameter(i);
            Debug.Log($"Parameter {i}: {parameter.name} ({parameter.type})");
        }
    }
}
```

Additional Resources: [AnimationParameters](/engine/6000.5/manual/animation-section/animation-mecanim/animation-animator-controller/animation-state-machines/animation-parameters.md) manual. [AnimatorController.parameters](/engine/6000.5/script-reference/unityeditor/animations/animatorcontroller/parameters.md) for accessing the list of parameters.
