Skip to content

format

typescript
AudioSource.Play()

class: AudioSource

description

Plays the audio clip associated with the audio source.

parameter

param_nametypedescription

reture

typedescription
void

code example

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