Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Audio Unity

private AudioSource audio; // Get the audio
void Start()
{
	audio = GetComponent<AudioSource>();  // Get the component(Add the component first and don't forget to atach the audio)
	PlayAudio(); // Call the PlayAudio Function
}
void PlayAudio()
{
	audio.Play(); // Play the audio use Stop() to stop the audio
}
 
PREVIOUS NEXT
Tagged: #Audio #Unity
ADD COMMENT
Topic
Name
1+4 =