|
Post by nitrox32 on Jan 23, 2021 17:48:16 GMT
I'm looking to fade music after a battle. Currently the music is set to loop until the battle if finished. I have an object with an Event Sounds component on it. There are two actions on the component. This first actions starts the music when the object becomes active at the start of the battle. The second fades the music to -90db when it becomes inactive at the end of the battle. I have two questions: 1) Is the the best way to do this? 2) Because the music is set to loop, does it continue playing (at -90db) and therefore continue to take up audio memory/processing even though it is inaudible?
|
|
|
Post by DarkTonic Dev on Jan 23, 2021 19:29:27 GMT
There's a setting that makes completely faded music stop by itself, under Advanced Settings / Fading. It defaults to off.
Or if you do it from code, you can call the method to make it fade, and pass a delegate for code to execute when it's done fading. And that's more flexible if you want to code.
|
|
|
Post by nitrox32 on Jan 23, 2021 21:13:25 GMT
Great! Thanks!
|
|
|
Post by DarkTonic Dev on Jan 23, 2021 22:32:34 GMT
No problem.
|
|