Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PlayOnGamepad(int)

Enable the audio source to play through a specific gamepad.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AudioModule
public bool PlayOnGamepad(int slot)

Parameters

slot

Slot number of the gamepad (0-3).

Returns

Type

Description

boolReturns TRUE if enabling audio output through this users controller was successful.

Remarks

Set your current BuildTarget to PS4 or PS5 to avoid a build error in the Windows Editor.