# SetFloat

> Send float values to the AnimatorController to affect transitions.

## Definition

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

## SetFloat(string, float)

Send float values to the AnimatorController to affect transitions.

```csharp
public void SetFloat(string name, float value)
```

### Parameters

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

### Remarks

Use SetFloat in a script to send float values to the AnimatorController in order to activate transitions. In the AnimatorController, define what values affect how certain animations transition. This is useful in various situations, especially in animation cycles such as movement animations where you might require the character to walk or run depending on the button pressure applied.

## SetFloat(string, float, float, float)

Send float values to the AnimatorController to affect transitions.

```csharp
public void SetFloat(string name, float value, float dampTime, float deltaTime)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The parameter name.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The new parameter value.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The damper total time.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The delta time to give to the damper.

### Remarks

Use SetFloat in a script to send float values to the AnimatorController in order to activate transitions. In the AnimatorController, define what values affect how certain animations transition. This is useful in various situations, especially in animation cycles such as movement animations where you might require the character to walk or run depending on the button pressure applied.

## SetFloat(int, float)

Send float values to the AnimatorController to affect transitions.

```csharp
public void SetFloat(int id, float value)
```

### Parameters

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

### Remarks

Use SetFloat in a script to send float values to the AnimatorController in order to activate transitions. In the AnimatorController, define what values affect how certain animations transition. This is useful in various situations, especially in animation cycles such as movement animations where you might require the character to walk or run depending on the button pressure applied.

## SetFloat(int, float, float, float)

Send float values to the AnimatorController to affect transitions.

```csharp
public void SetFloat(int id, float value, float dampTime, float deltaTime)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The parameter ID.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The new parameter value.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The damper total time.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The delta time to give to the damper.

### Remarks

Use SetFloat in a script to send float values to the AnimatorController in order to activate transitions. In the AnimatorController, define what values affect how certain animations transition. This is useful in various situations, especially in animation cycles such as movement animations where you might require the character to walk or run depending on the button pressure applied.
