文档

Unity Engine

Unity Engine

PlayOnGamepad(int)

Enable the audio source to play through a specific gamepad.
阅读时间1 分钟最后更新于 6 小时前

Definition

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.