resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

Baking window locks up the editor in project with a lot of mateirals. #16

Closed wrstscrnnm6 closed 6 years ago

wrstscrnnm6 commented 6 years ago

I am running Unity 2017.2.0f3 and downloaded SDK 1.1.1 I could run the test scenes fine. I could create Reverb probes and adjust their position etc. without any trouble. When I go to open the reverb baking window, everything grinds to a halt. CPU use shoots up and the editor frame rate falls to <1FPS.

This project has 595 materials in it. I suspected that was the root of the issue. After digging around in with the editor profiler. I found:

As a test, I disabled the AssetPreview calls in the editor script for the Baking Window and that brought that window from unusable to simply sluggish.

I don't, of course, know all of how things are implemented under the hood. But I might suggest modifying the workflow a bit to allow the user to select which materials they want to be visible to the reverb baker (e.g. create a new list/array item > select the material > select the acoustic behavior ) rather than auto-mapping every material in the project.

anokta commented 6 years ago

Thanks for the suggestion and findings! We will discuss this issue internally to see how we can improve upon the material mapping workflow accordingly.

anokta commented 6 years ago

Major improvements in Editor performance with v1.2.0. Closing the issue, please feel free to let us know if you have any further concerns.