AudioSource.playOnAwakevar playOnAwake : boolDescriptionIf set to true, the audio source will automatically start playing on awake
if(! audio.playOnAwake) {
audio.Play(); // Play the clip if it wasn't set to play on awake } |
|
||||
| Scripting > Runtime Classes > AudioSource | Switch to Component | |||
AudioSource.playOnAwakevar playOnAwake : boolDescriptionIf set to true, the audio source will automatically start playing on awake
if(! audio.playOnAwake) {
audio.Play(); // Play the clip if it wasn't set to play on awake } |