# AddCondition(AnimatorConditionMode, float, string)

> Utility function to add a condition to a transition.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Animations](/engine/6000.5/script-reference/unityeditor/animations.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public void AddCondition(AnimatorConditionMode mode, float threshold, string parameter)
```

### Parameters

**** (\[AnimatorConditionMode]\(/engine/6000.5/script-reference/unityeditor/animations/animatorconditionmode)): The [AnimatorCondition](/engine/6000.5/script-reference/unityeditor/animations/animatorcondition.md) mode of the condition.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The threshold value of the condition.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the parameter.

### Remarks

An example showing usage of this API can be found at the [AnimatorController](/engine/6000.5/script-reference/unityeditor/animations/animatorcontroller.md) page.
