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

Bug [M1 Native] RecalculateGizmos taking long when there's a lot of scene objects and gizmos are enabled

Discussion in '2021.2 Beta' started by anatolyV, Jul 15, 2021.

  1. anatolyV

    anatolyV

    Joined:
    Nov 29, 2014
    Posts:
    63
    Bug Report Case 1350835

    So basically whenever there are a lot of objects in the scene and gizmos are enabled, I'm getting sometimes multi-second lag spikes with a frozen editor when selecting something in hierarchy. If gizmos are disabled the lag spike does not occur. The culprit seems to be RecalculateGizmos in profiler and it's directly correlated with the number of objects in the scene. This wasn't the case in Unity 2020. The bug report should contain a repro project but it's fairly easy to recreate, just clone an object a lot of times and select stuff in hierarchy.
     

    Attached Files:

    MaxWitsch likes this.
  2. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I also faced this bug.
    In my project, the editor freezes for 2 seconds every time I change the selection.
    A annoying loading bar with RecalculateGizmos does appear.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for the bug report @aVolnov, we'll look into it.
     
    anatolyV likes this.