I was writing a game project on Unity and stumbled with inability to make an audio play infinitely in main menu.
The problem is that the track is played only once (while staying in the menu), when I need it to be repeating until player leaves the menu.
Here is the part of the code where I enable music. I use AudioClip and AudioSource for this.
public AudioClip menu;
private AudioSource audio;
void Start() {
...
audio = GetComponent<AudioSource>();
audio.loop = true;
audio.PlayOneShot(menu);
...
}