For a small and medium-sized project, it takes 25-35 seconds to enter play mode each time.
I know that the project settings editor has an enter play mode setting, which can speed up entering play mode, but it does not work for my project. Even many Unity packages/third-party packages are not supported.
I tried the UE5 demo project a while ago. The project size is about 100G. It only took me about 30 minutes from opening to running. I can’t imagine how slow it will be if the Unity project is under 100G content.
Have you tried to disable “Domain reload” and “Scene reload” and “Sprite Packer” in project settings? We had a lot of problems with Enter Play mode before (140GB project after import), but turning these options off made it almost instantaneous.
Also, you can use the profiler in “Editor” mode to check where the editor is wasting all this time. If you can reproduce it, would be nice to report this as a bug.
The casualties of having multiple dozens of assemblies being assembly reloaded. Disabling the domain reload on play just like jeddi said can definitely help you with this, but compiling during play will still subject you to this pain.
Thanks for the reply, but my project cannot use “Domain reload” because the library I use does not support it, such as Unity’s new input system, MessagePack library, etc.
If you use a library that doesn’t support it in the first place, disabling domain reloads on entering playmode won’t affect the behaviour that much at all (in some cases you could, which you’ll need to manually reimport a script). You should give it a try.
Where can you even see if the library supports domain reloads? The only problem I had with Input system was that sometimes it doesn’t work right after a script recompile. It works again if you start the game again (literally one second). I would also recommend to give it a try even if the library doesn’t support it.
It apparently doesn’t work if you use the PlayerInput component instead of eg. the Generate C# File approach or other approaches. At least that’s what people have written on the forums - I haven’t run into any issues with domain reload turned off either.