Answered
0
0

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
http://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://www.youtube.com/watch?v=gydgmb9-4Ps&feature=youtu.be

  • You must to post comments
Best Answer
0
0

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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.