|
Post by Chien on Jul 31, 2019 8:55:22 GMT
Hi,
We are making an open world game, so we have a lot of sound load into the world all the time, like 1500 audio source. Most of our sound has like 5 to 10 variations. For all those active audio source, even not playing just stay in scene, it costs some cpu time. So is it possible you can make the not playing variations disable by default? Only enable it when is playing. Thank you.
|
|
|
Post by DarkTonic Dev on Jul 31, 2019 9:00:27 GMT
I did some tests back in Unity 5 when it was new and there was no impact from non-playing Audio Sources, memory or CPU wise. Also, I don't believe you can disable an Audio Source, although you can disable the entire game object.
So I do not believe that is true. Please let me know why you believe that is true.
|
|
|
Post by Chien on Aug 2, 2019 8:48:43 GMT
so I profile it in our game. With all audio source active and it use 1ms in PostLateUpdate.UpdateAudio and 0.42ms in FixedUpdaet.AudioFixedUpdate.
When I disable all audio source game object, then it use 0.35ms in PostLateUpdate.UpdateAudio and 0.01ms in FixedUpdaet.AudioFixedUpdate.
In both case, there are 3 audio source are playing. We are using Unity 2018.4 and Master Audio V4.2.2
|
|
|
Post by DarkTonic Dev on Aug 2, 2019 19:36:42 GMT
Thanks for the info. I tried briefly to fix this a couple years ago but it was going to be difficult so I gave up.
I will add this to the roadmap and tackle it again.
|
|
|
Post by DarkTonic Dev on Nov 5, 2019 20:53:26 GMT
Hi, I've got this working and fixed all issues that I found. You can email us with your invoice PDF if you want to try the beta before release.
|
|