play sound in unity trough script code example
Example: play sound unity
AudioSource audioData;
void Start()
{
audioData = GetComponent<AudioSource>();
audioData.Play(0);
Debug.Log("started");
}
AudioSource audioData;
void Start()
{
audioData = GetComponent<AudioSource>();
audioData.Play(0);
Debug.Log("started");
}