|
Java Code - Music / Sounds
[Back]
Code:
//Sounds
Var testaudio : AudioClip; //What audio you want it to play
audio.PlayOneShot(testaudio); //Play the sound
//To make this work you will need to add a audio source to the object that the code is on, to find this go to component, audio, audio source
Var testaudio : AudioClip; //What audio you want it to play
audio.PlayOneShot(testaudio); //Play the sound
//To make this work you will need to add a audio source to the object that the code is on, to find this go to component, audio, audio source