Answers for "how to get unity to play random sounds"

C#
0

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);
}
Posted by: Guest on April-23-2021

C# Answers by Framework

Browse Popular Code Answers by Language