Home > Mobile >  Unity how to fix performance issues with profiler
Unity how to fix performance issues with profiler

Time:09-10

When starting my Unity game in play mode unity it freezes initially for 75 seconds. Which is pretty annoying during development. I don't know how to find out why this happens.

CodePudding user response:

After some digging myself I found that the Profiler in unity can help allot to track down performance issues, down to specific methods. The profiler can be found Window -> Analysis -> Profiler.

In the Profiler window make sure "Clear on Play" and "Deep Profile" is ticked. Now start play mode and wait till the freezing is over. You will see a spike in CPU Usage. In the stack trace sort on "Time ms". Most likely "PlayerLoop" will be on top as most of your scripts run here. Click on it to expand, and now keep expanding the top most until you find methods that you have created.

enter image description here

  • Related