# Music while changing scenes in unity

**URL:** <https://qa.fmod.com/t/music-while-changing-scenes-in-unity/13123>\
**Category:** Unity\
**Created:** [April 20, 2017, 8:56pm UTC](https://qa.fmod.com/t/music-while-changing-scenes-in-unity/13123 "2017-04-20T20:56:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbmusicpl](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mbmusicpl](https://qa.fmod.com/u/mbmusicpl)\
**Post date:** [April 20, 2017, 8:56pm UTC](https://qa.fmod.com/t/music-while-changing-scenes-in-unity/13123/1 "2017-04-20T20:56:35Z")

</div>

Hi,  
I am still fighting with integration 🙂  
I have 2 scenes in Unity: “a” and “b”. There is different music in each scene. I would like to fade out music “a” while i jump to scene “b”

There are trigger colliders that are changing my scenes. I am trying with parameters but i dont know if thats good idea.

Any clues how to make it work?  
thx

[[Album] Imgur ![](https://i.imgur.com/FclQ4H8.jpg?fb "Imgur") ](https://imgur.com/a/2c4Qb)
  
Edit:

This video shows that in one scene trigger zones works fine but when i change scenes i dont know what to do

[![](https://img.youtube.com/vi/gydgmb9-4Ps/hqdefault.jpg "Fmod\Unity - triger zones test scene") ](https://www.youtube.com/watch?v=gydgmb9-4Ps)

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [April 24, 2017, 12:18am UTC](https://qa.fmod.com/t/music-while-changing-scenes-in-unity/13123/2 "2017-04-24T00:18:47Z")

</div>

To use a parameter change between scenes you would need to keep the object with the event attached around, using DontDestroyOnUnload. Otherwise when you unload a scene, all the objects in that scene get destroyed, including any references to events you had.

Also when you reload scene a another instance of the event gets created, you can use the “Trigger once” on the Studio Event Emitter script to make sure it doesn’t get re-triggered, or destroy it before creating another instance.
