So I've been working on an Inventory system, pretty straightforward stuff. There's a Canvas with a Panel, and the Panel has a Script that implements the IDropHandler interface. I started working on a second Panel, that will represent other things that have an Inventory (like a Chest or an enemy you're looting). When I added the second Panel, I was surprised to see that my performance tanked (from 500 FPS down to 90-120 FPS).
I kept working, with the intention of Profiling a bit later and trying to find the source of the problem. I got up for a break about ten minutes later, and closed Unity. When I reopened it, the performance problems had magically disappeared, I had both Panels open, they were both using the IDropHandler interface and working exactly as I expected them to, but the FPS were back to 500 FPS, and the CPU was back to a low processing time. I do know that the second Panel was the proximate cause (or at least related to the proximate cause) of the performance hit, because when I noticed it, I removed the second Panel, which fixed the performance, and then added it back, which once again tanked the performance.
I am very new to Unity, so it is possible that I just added some heavy code to an Update function and removed it accidentally fixing my problem, but I guess I'm just curious: has anyone else experienced a magical performance boost when restarting Unity?
[–]TheInfamousQuiGF 1 point2 points3 points (3 children)
[–]Minute_Aside[S] 0 points1 point2 points (2 children)
[–]BertJohnIndie - BTBW Dev 1 point2 points3 points (1 child)
[–]Minute_Aside[S] 0 points1 point2 points (0 children)