how to use music in the menu ?

I have created a menu and I want that when the game starts to feel a music soundtrack that I put in the folder, but I tried so many times with the script that I found around the net but nothing worked. then as it gets?

That’s what you need

Yes, but that script should I use? the link there are no written

I use this little script to play musics in my game, it can’t change the music without changing the scene for now but it works fine, if you have some idea to improve this script please let me know :slight_smile:

#pragma strict

public var SoundClip : AudioClip;
private var SoundSource : AudioSource;

function Awake()
{
    SoundSource = gameObject.AddComponent(AudioSource);
    //SoundSource.playOnAwake = false;
    //SoundSource.rolloffMode = AudioRolloffMode.Logarithmic;
}

function Start()
{
    SoundSource.clip = SoundClip;
    SoundSource.loop = true;
    SoundSource.volume = 0.1;
    SoundSource.panLevel = 0;
    SoundSource.Play(); 
}

EDIT: To use this, simple attach this script to some object that will not be destroyed, otherelse the music will stop.