- Home /
I found out the answer my own way.
Intro to looped music
Every video game needs BGM and some include intros to the looped music. How would you add an intro to your own BGM?
Edit: I know the basics on BGM (Adding it into the game, looping it etc) I'm just looking for adding an intro to the music.
I know you already got the answer but this is for someone reaching this via search engine and wanted to solve this problem : http://forum.unity3d.com/threads/378370/
Answer by programmrzinc · May 15, 2013 at 12:58 PM
I suggest creating a 2D Audio source (add an mp3 to your project, and make the sound 2d. Then, add a audio source to the main camera,with the audio file) .
You can add scripts that will control these sounds.
I know the basics on BG$$anonymous$$ music, I just want to know about the looping part...
http://docs.unity3d.com/Documentation/Components/class-AudioSource.html
http://docs.unity3d.com/Documentation/ScriptReference/AudioSource.html
http://docs.unity3d.com/Documentation/ScriptReference/AudioSource-loop.html
You can tick the loop box in the AudioSource component, or tell the AudioSource component to be set to loop through script.
Follow this Question
Related Questions
Intro to looping music in single audio clip? 2 Answers
my foreach loop and condition wont work 0 Answers
Change transform.position.y in a loop 1 Answer
How can I loop objects with Polygoncollider2D attached to them? 0 Answers
Why is OnGUI not working? 1 Answer