ドキュメント

Unity Engine

Unity Engine

PlayOnGamepad(int)

Enable the audio source to play through a specific gamepad.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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.