# PlayOnGamepad(int)

> Enable the audio source to play through a specific gamepad.

## Definition

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

```csharp
public bool PlayOnGamepad(int slot)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Slot number of the gamepad (0-3).

### Returns

| Type                                                          | Description                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns TRUE if enabling audio output through this users controller was successful. |

### Remarks

Set your current [BuildTarget](/engine/6000.6/script-reference/unityeditor/buildtarget.md) to **PS4** or **PS5** to avoid a build error in the Windows Editor.
