Skip to content

格式

typescript
AudioSource.Play()

所属类: AudioSource

描述

播放音频源所关联的音频剪辑。

参数

参数名类型描述

返回值

类型描述
void

代码示例

typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.Play();