format
typescript
AudioSource.playOnAwakeclass: AudioSource
description
Whether to automatically play audio when the game object is awakened.
If the audio source automatically plays audio when the game object is awakened, it is true; otherwise, it is false.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
boolean | Whether to play on awake |
code example
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.playOnAwake;