How to optimize load time when pressing the play button in the editor.

I’m looking for what exactly influences the time it takes the editor to go to playmode when the user presses the play button. It currently takes 5-6 seconds for the project to load properly after pressing the play button and I’d like to find out what I can do to speed this up.

Does anyone know what exactly happens under the hood when the play button is pressed?


when the play button is pressed Unity reloads ALL scripts ALL assets and well everything in your assets folder and everything in your currently loaded scene so if you have a empty or useless script DELETE IT don’t just leave it there same with things like models and everything else you have stashed in your assets folder hope this helps