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

Unity Editor UI keeps reloading something after each click

Discussion in '2021.1 Beta' started by newguy123, Jan 31, 2021.

  1. digimbyte

    digimbyte

    Joined:
    Jun 23, 2012
    Posts:
    58
  2. digimbyte

    digimbyte

    Joined:
    Jun 23, 2012
    Posts:
    58
    20 minutes to load after alt tabbing
    then this once I placed an object in the scene.

    Who do I send my project too? I need this fixed.
    I'm only creating a WebGL template!
    upload_2022-9-12_22-28-10.png
     
  3. Doronn

    Doronn

    Joined:
    Sep 17, 2018
    Posts:
    8
    A little late to the party here.
    But we've been experiencing this problem on our team as well.
    I have thought it's something that we did in our huge project and that we somehow do something on repaint and just can't figure out what.

    But...
    Today, I've ran a debug on the editor while this loading appeared and was able to find a thread where `UiElementsUtility.cs` was involved in an event type of `Repaint` and called `panel.Repaint(UIElementsUtility.s_EventInstance);` and somewhere down the line in that thread, there was some code executed in `AddressableAssetSettings` and other Addressables related code.

    My guess is that when clicking any element in a big project, the addressables feature tries to map all the addressables data just to preview the `Addressable` checkbox in the inspector view.

    The performance issue for us atleast might come from that.

    Any chance this could be checked by the unity team?


    Edit:
    The specific problematic code is when using `RefreshEntriesCache()` in `AddressableAssetGroup` while clicking on an item in the inspector.

    I think this should be cached in advance and not be done lazily when requested by the inspector repaint.
     
    Last edited: Sep 15, 2022
    Ruslank100 likes this.
  4. true_warlock

    true_warlock

    Joined:
    Aug 2, 2019
    Posts:
    60
    Great job. You guys pushed more bells and whistles, broke what wasn't broken and "fixed" what didn't need to be fixed.

    At this point, I have become fed up with all the current "LTS" version recommendations that keep breaking with these Repaint and whatnot just from clicking on tabs inside the editor itself! That is not making anything easier for anyone unless you are trying to make it easier to quit using Unity and you are trying to implode the service.

    For now I am removing all the so called LTS versions as it seems after May of 2019, all subsequent versions have gotten worse and worse, and worse, and designed to crash. Really bad when the only really stable version is 2018.4.1f where all the fixes are actually fixed but everything before and after is loaded with issues.
     
    Last edited: Oct 8, 2022
    Ruslank100 likes this.
  5. digimbyte

    digimbyte

    Joined:
    Jun 23, 2012
    Posts:
    58
    non LTS has repaint dialog popups on the most basic projects.
    I created a project with just amplify shaders in 2022 and navigating folders has a repaint on every click for multiple sessions
    I am considering downgrading to 2018
     
  6. digimbyte

    digimbyte

    Joined:
    Jun 23, 2012
    Posts:
    58
    can I send my projects in?
     
  7. pinesG

    pinesG

    Joined:
    Feb 7, 2017
    Posts:
    4
    This has started happening on our scenes as well. We are using a ton of HDRP post processing effects and dense engineering data. It didn't happen in previous releases, but has started happening on nearly every mouse click. I get repainting... whichever window I am on, and sometimes windows that are refreshing in the background.

    We have found that by reducing the overall load on the system, like hiding things in the Scene view help drastically, but does not help when we have a Game view open and its attempting to process a scene. Is there a way to have the Game view not try to constantly redraw? Am I missing a pause button in the editor. Coming from animation pipelines this isn't new.

    upload_2022-10-26_21-11-30.png

    upload_2022-10-26_21-14-8.png
     
  8. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    569
    [UPDATE: Solution for me is in the next post]
    -----------------------------------------------
    I've suddenly got hit by this too today, out of the blue. Unity 2021.3.5f1. Haven't updated ANYTHING recently, but this dialog appears now as of today. Like, I can't work, it pops up too frequently and it stays forever until I CTRL-ALT-ESC and kill the Unity Editor task.

    The ONLY thing that has "changed" on my end is yesterday Plastic SCM popped up a sign-in dialog (which it never did in the past) and I was too quick and clicked "Login with Unity ID" instead of the other way with email/password, which I had used previously.

    Past similar troubles with Plastic SCM and dialogs staying forever compiling, was to simply make an edit in code, save, go back to Unity and the compiling would finish right up. This issue now though has to do with UI "painting" so that trick doesn't work.

    What do I do?
     
    Last edited: Dec 1, 2022
  9. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    569
    The fix for me was to log out of the local Plastic SCM client/server that was using Unity ID for login since 2 days ago and instead I logged in "directly" to Plastic SCM. Then I updated the PlasticSCM client/app and the problem went away.
     
    FernandoMK likes this.
  10. Acer85

    Acer85

    Joined:
    Mar 10, 2019
    Posts:
    30
    So... any progress here Unity? I use 2020.3 and its extremly slow sometimes. When I get the repaint messages I most often just restart Unity and sometimes it works. But over all its just really slow and I dont have much in the scene. I have a SUPER computer but that doesn't not seem to help.
    Do you have any tips how to make it posible to work in the editor? like closing tabs.

    Do we have one verison of Unity that is fast and stable?
     
  11. MoLavaie

    MoLavaie

    Joined:
    Feb 19, 2019
    Posts:
    12
    Hi. I'm also having problem with UI taking too long to appear, which happens for Project Settings. I'm using 2022.3 LTS and this is the first time I am using an LTS version and also the first time this has happened to me. This is what profiler says:

    upload_2023-8-21_16-44-0.png

    Under Application.Tick:
    upload_2023-8-21_16-44-38.png

    And under Application.Message:
    upload_2023-8-21_16-45-5.png

    This bug happens in all projects that use this Unity version. But so far, it seems only Project Settings gets stuck. It is a huge bummer, any change in the settings and I'm stuck for half a minute each time. It's like an infinite loop called in OnValidate call back. I can't work at all.

    Is there anything else I can do?
    @MartinTilo
    @LeonhardP
     
  12. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Why would you post those screenshots and not expand OnGUI? Of course OnGUI is the slow thing if the UI is slow. What's happening inside that function is the actually useful part!
     
  13. MoLavaie

    MoLavaie

    Joined:
    Feb 19, 2019
    Posts:
    12
    oh yeah my bad
    upload_2023-8-22_16-16-25.png

    I have a TON of FileVFS.IsDirectoryCreated and GC.Alloc messeages under ONGUI. Up until here exactly:
    upload_2023-8-22_16-18-8.png

    This is also interesting:
    upload_2023-8-22_16-18-42.png
     
  14. MoLavaie

    MoLavaie

    Joined:
    Feb 19, 2019
    Posts:
    12
    I also found something else interesting. This only happens when I'm in Icon section of Android tab of the player settings. Doesn't happen under PC and Dedicated Server tabs, or any other section under Android player settings. It took a literal whole minute to render these three dropdowns and two warnings:
    upload_2023-8-22_16-21-38.png

    This also happens in 2022.3.7f1 LTS and the latest 2023 version, I believe it was 2023.1.9f1. Also Package manager throws a lot of errors under My Assets tab when loading assets. Practically does not load anything, also freezes sometimes like here, again both in 2022.3.7f1 LTS and 2023.1.9f1. It is extremely frustrating :(
     
  15. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    @Mashti:
    1. Are there any error or warning messages in the console or Editor.log file after opening these views that indicate anything you could change in your project or hint that e.g. updating a package to the latest version might make these messages go away?
    2. If you switch the CPU Usage view from Raw Hierarchy to Hierarchy, the table would likely be a bit more easily scrollable. If you switch it to Timeline you could potentially get a better sense of the order of events and e.g. which GC.Alloc happens early on in vs later on within the OnGUI event.
    3. If you switch on recording of callstacks for GC.Alloc and check the callstacks on those GC.Allocs (checking a few different ones at different times within the OnGUI event) you might get a better idea for what code is executing there and allocating so much managed memory
    4. If the above doesn't get you anywhere, you might want to try switching on Deep Profiling instead to see what's happening.
    If after checking all of this, it looks to be no issue with your project setup or code, a bug report filed via the Editor menu entry
    Help > Report A Bug
    might be the best course of action to continue with this.