.Exe gets slower over time
My Unity application gets slower over time. It's a 4 minute VR desktop application using Oculus Rift.
When the "adventure" ends, the level restarts ( Application.LoadLevel(0)). On the first, second and third play, the program works fine. When the program is running for 20 minutes( more or less), it becomes slower and slower.
At first I thought that it was something that was being written on the log file, but it wasn't.
Second I deleted all the objects with transparencies, the problem remained.
I deleted the Reflection Probles. The problem remained.
I've done a series of tests and concluded that if I delete some animated objects, the problem disappears.
When I reload the level, the problem stays the same but when I close and reopen the application the problem disappears.
What could be causing this problem? At first it works fine but, somehow, its delaying the whole project.
Thank you for your help!
Have you used the Profiler yet?
Is your CPU overheating causing throttling? I've had that happen. Blow the dust off your fans.
I used the profiler and unfortunately I could not find the problem.
I've checked that also, the CPU is not overheating.
$$anonymous$$aybe there is some value that is being storage and does not reset on the level reload. I also have tons of lights, maybe this is causing trouble..
Or maybe there is a way to reset everything (Clearly the application reload is not resetting everything).
Thank you for your help!
How did you not find the problem with the profiler? Does it not show a slowdown? Does it show constant memory allocations? Those allocations may start causing a lot of garbage collections which can slow things down as well. All of that should be visible in the profiler.
If you are on 5.2.1 , there is a memory leak when shadows are enabled, although no idea why removing some animated objects would solve that, the only way I can solve it is to close the app and re-open (or upgrade I guess, but there are many issues with animators in the latest builds)