how to play multiple song.

I’m trying to be able to add songs into a game item (in this case the camera).
Here’s my code

public AudioClip[] songs;
int currentSong = 0;

void Update (){
	if (audio.isPlaying == false) {
		currentSong++;
		if (currentSong >= songs.Length){
		    currentSong = 0;
		audio.clip = songs[currentSong];
			audio.Play();
		}

}
}

However, when I try to access the array, the script connected to the camera has nothing I can add to put songs in.

Look on the script in the inspector for the word “Songs”. There should be a small foldout triangle on the left of it. Clicking the foldout triangle will toggle display of the elements of the songs array.

To insert songs into the array, select them in the project view, then drag them and drop them onto the text that says “Songs”; they will be added to the array automatically. This works even when the foldout is not open.