I’m creating a WPF aplication that uses Unity as a visualizer of 3D objects that are saved in the DB, just like this (simpler) example: Dropbox - File Deleted - Simplify your life
In my application I have 2 tabs.
1 were I load the items from the DB
2 were I display the 3D objects in Unity
When I am on the 1 tab, Unity is not visible and its resource consumption is through the roof! It takes 99% of the GPU and shown in the attached image idle.png
But when I’m displaying the 3D objects, the resource consumption goes to a normal 10%.
My question is, Why does this happen? When Unity is not being used, its resource consumption explodes!
Using the example you provided I tried making a test WPF application to recreate the issue you’re encountering. Just running the Cube demo in a TabControl, with nothing else in the window didn’t seem to have any unusual performance impact, whether visible onscreen or not. I’ve attached some pictures of my results.
While the Unity window was hidden, the GPU load actually went down for me. This leads me to believe your problem might be with what specifically you’re displaying in Unity. If you use the Cube demo in your application instead, do you still get the GPU spike?
Have you tried running the application that I’ve sent you and press the ‘Hide’ button in there and record the performance?
And the unity control. Where you able to implement the unity control on your own application easily?
Regardless of what I am displaying in unity, when I hide the tab, both GPU and CPU load go up. It doesn’t matter if I’m displaying a simple cube, a 3D model, or nothing at all. But if it works for you I’m glad :). maybe my problem is a windows configuration or something.