Hi there,
Scratched my head for hours on this one, I have tried multiple things but my music is not looping.
I have checked the loop button in Unity and I have also coded this into monodevelop…
using UnityEngine;
using System.Collections;
public class MusicPlayer : MonoBehaviour {
static MusicPlayer instance = null;
public AudioClip clip; // Drag the clip here on the editor
private AudioSource au;
void Awake() {
if (instance != null) {
Destroy (gameObject);
} else {
instance = this;
GameObject.DontDestroyOnLoad(gameObject);
}
}
void Start () {
au = GetComponent<AudioSource>();
au.loop = true;
au.Play();
}
}
however still nothing is working.
driving me insane to say the least, If anyone could guide me in the right direction that would be great…
Thanks, Jordan