Hi guys i just created this script basically what it is there is a array on the top that is created which holds musics. Now what i want is when i press the GUI button i want the audion to play from the array. I only want it to play Element 0 from the array list
here is my script:
using UnityEngine;
using System.Collections;
public class PlayMusic : MonoBehaviour {
public AudioClip[] Tracks;
// Update is called once per frame
void OnGUI () {
if (GUI.Button(new Rect(10,20,120,20),"Play Tracks")){
}
}
}
thanks for the help in advance :)