Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

The 2021.2 editor is too slow.

Discussion in '2021.2 Beta' started by zhuxianzhi, Jul 1, 2021.

  1. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    122
    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.

    upload_2021-7-1_16-40-44.png

    upload_2021-7-1_16-40-16.png
     
    futurlab_peterh likes this.
  2. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    246
    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.
     
    futurlab_peterh likes this.
  3. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    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.
     
    zhuxianzhi likes this.
  4. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    122
    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.
     
  5. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    246
    I'm using Unity's new input system with domain reloads disabled. Do you know what issues it will have if disabled?
     
  6. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    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.
     
    Last edited: Jul 2, 2021
  7. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    246
    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.
     
  8. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    I noticed a significant overall slowdown in most things when upgrading from latest 2021.2 alpha to the betas...
     
  9. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    122

    If the library uses static properties or singleton mode, there may be problems, unless it is explicitly stated to support "Domain reload".

    I can indeed use "reimport a script" to recompile to avoid static problems. But "reimport a script" itself is very slow.

    The new input system is currently clearly not supported
    https://forum.unity.com/threads/inp...ns-reload-domain-support.917861/#post-6015122
     
  10. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    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.
     
    mahdi_jeddi likes this.
  11. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    85
    So no fix for this? It always takes around 30 sec to load and other 30 sec to unload the scene...