1
\$\begingroup\$

I have a scene with quite a few gameobjects in it and for the first time since using Unity, when I enter/exit play mode (or even close and reopen the scene) it takes about a minute to complete this. There are no scripts on any of these gameobjects (except the LOD group component) as I am just setting up the art at the moment, the interactivity I will do later. Happy to be corrected, but I suspect that other than the number of objects the other 2 slow downs may be prefab nesting and the fact that I've done some probuilder overrides to some of the gameobjects.

Irrespective of that I am wondering if there's a way with Unity's built in tools (eg. Profiler) to identify which gameobjects in the scene are causing the most slow down? I've tried using Profiler but can't find a view that shows me a comparison of how much performance each gameobject requires or similar so I can then determine which ones I can try to optimize further. Ultimately if the issue ends up being something other than a few specific gameobjects that's fine, but I still think this is a good general optimisation step to know how to do. So to clarify I am not looking for a way to see which scripts are the issue but which gameobjects themselves are.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ the dumbest way is to remove game objects and see when your startup is faster \$\endgroup\$ Commented Oct 12 at 9:18

1 Answer 1

1
\$\begingroup\$

You can use Unity's Editor Profiler to analyse performance (Window > Analysis > Profiler > Editor). In the Profiler, switch to the editor category and look for spikes in the graph at “Reload Scene,” “Reload Assemblies,” or “Awake/OnEnable.” After identifying the spikes, you can disable different GameObjects or functions to determine which one is causing the delay. Additionally, keep in mind that deep and large meshes can also contribute to performance issues.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Also, if you don't want to reload the domain each time you enter play mode, you can just go to Settings and Disable "Reload domain on entering play mode". It helps to instantly enter play mode. \$\endgroup\$ Commented Oct 15 at 19:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.