# SetInteger

> Sets the value of the given integer parameter.

## Definition

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

## SetInteger(string, int)

Sets the value of the given integer parameter.

```csharp
public void SetInteger(string name, int value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The parameter name.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new parameter value.

### Remarks

Use this as a way to trigger transitions between Animator states. One way of using Integers instead of Floats or Booleans is to use it for something that has multiple states, for example directions (turn left, turn right etc.). Each direction could correspond to a number instead of having multiple Booleans that have to be reset each time.

See documentation on [Animation](/engine/6000.6/manual/animation-section/animation-mecanim/animation-animator-controller/animator.md) for more information on setting up Animators.

Note: You can identify the parameter by name or by ID number, but the name or ID number must be the same as the parameter you want to change in the AnimatorController.

## SetInteger(int, int)

Sets the value of the given integer parameter.

```csharp
public void SetInteger(int id, int value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The parameter ID.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new parameter value.

### Remarks

Use this as a way to trigger transitions between Animator states. One way of using Integers instead of Floats or Booleans is to use it for something that has multiple states, for example directions (turn left, turn right etc.). Each direction could correspond to a number instead of having multiple Booleans that have to be reset each time.

See documentation on [Animation](/engine/6000.6/manual/animation-section/animation-mecanim/animation-animator-controller/animator.md) for more information on setting up Animators.

Note: You can identify the parameter by name or by ID number, but the name or ID number must be the same as the parameter you want to change in the AnimatorController.
