- Home /
Pokemon Style Sound Fade...
Bare with me on this one...
Okay - I want to be able to fade a music track at any time so that it fades in and starts with another music track in Unity at a certain point (for example when close to a box or another object)
The reason I mentioned Pokemon is because the games do exactly what I want to recreate in Unity when the player moves from town to town or route to route. They fade out at any point when the user moves to another area and start another music track when the player enters a different location.
Any ideas how I could recreate that in Unity? If you have any suggestions I'd love to hear them.
For the sake of demo codes that anybody might drop here to let me know I'll call the two tracks I want to use:
MusicTrack1.mp3
and
MusicTrack2.mp3
Thanks for you help in advance! :D
Answer by spinaljack · Aug 27, 2010 at 03:56 PM
http://unity3d.com/support/documentation/ScriptReference/AudioSource-volume.html
Just start playing the second track with volume 0 as soon as you walk to a new location and fade it up, at the same time fade out the 1st track...
so how would i go about fading the sound up and down in code?
Your answer
Follow this Question
Related Questions
Activate sound without Pro filters 0 Answers
scale animation result? 1 Answer
How to get spatial 3D sound on Video Player 1 Answer
FMOD failed to initialise Error 1 Answer
Unity Music Terms of Use 0 Answers