Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to play a random sound at the position that you want in unity

using UnityEngine;

public AudioSource[] source; 

private void Start()
{
	AudioSource.PlayClipAtPoint(source[Random.Range(0, source.Length)], position);
}
 
PREVIOUS NEXT
Tagged: #play #random #sound #position #unity
ADD COMMENT
Topic
Name
9+3 =