# GetFloat

> Returns the value of the given float parameter.

## Definition

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

## GetFloat(string)

Returns the value of the given float parameter.

```csharp
public float GetFloat(string name)
```

### Parameters

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

### Returns

| Type                                                          | Description                 |
| ------------------------------------------------------------- | --------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value of the parameter. |

### Remarks

If the float parameter you specify doesn't exist, the float returns as 0.

## GetFloat(int)

Returns the value of the given float parameter.

```csharp
public float GetFloat(int id)
```

### Parameters

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

### Returns

| Type                                                          | Description                 |
| ------------------------------------------------------------- | --------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value of the parameter. |

### Remarks

If the float parameter you specify doesn't exist, the float returns as 0.
