# GetBool

> Returns the value of the given boolean parameter.

## Definition

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

## GetBool(string)

Returns the value of the given boolean parameter.

```csharp
public bool GetBool(string name)
```

### Parameters

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

### Returns

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

### Remarks

Return the current state of a bool parameter within the Animator Controller. Use the parameter’s name or ID to search for the appropriate one.

## GetBool(int)

Returns the value of the given boolean parameter.

```csharp
public bool GetBool(int id)
```

### Parameters

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

### Returns

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

### Remarks

Return the current state of a bool parameter within the Animator Controller. Use the parameter’s name or ID to search for the appropriate one.
