Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug 2022.3 BondeRenderer Editor OnGUI performance really bad

Discussion in 'Animation' started by Taro_FFG, Jun 6, 2023.

  1. Taro_FFG

    Taro_FFG

    Joined:
    Jun 24, 2022
    Posts:
    57
    Hi,
    after upgrading our project from 2022.1 to 2022.3 we've noticed heavy editor lags when playing our project. Using the Profiler in Edit Mode with Call Stacks enabled we can see that the stack trace points to BoneRenderer.ExtractBones().


    SceneVisibilityState.Internal_InternalStructureChanged is called twice and each take about 6ms performance.
    All the allocations inside the 6ms block point to the ExtractBones function to in total ~15ms additional calculations which of course tanks the performance.


    Below a full callstack:

    Unity.Animation.Rigging.dll!UnityEngine.Animations.Rigging::BoneRenderer.ExtractBones() <a href="./Library/PackageCache/com.unity.animation.rigging@1.2.1/Runtime/Utils/BoneRenderer.cs" line="151">./Library/PackageCache/com.unity.animation.rigging@1.2.1/Runtime/Utils/BoneRenderer.cs:151</a>
    Unity.Animation.Rigging.dll!UnityEngine.Animations.Rigging::BoneRenderer.Invalidate() <a href="./Library/PackageCache/com.unity.animation.rigging@1.2.1/Runtime/Utils/BoneRenderer.cs" line="126">./Library/PackageCache/com.unity.animation.rigging@1.2.1/Runtime/Utils/BoneRenderer.cs:126</a>
    Unity.Animation.Rigging.Editor.dll!UnityEditor.Animations.Rigging::BoneRendererUtils.OnVisibilityChanged() <a href="./Library/PackageCache/com.unity.animation.rigging@1.2.1/Editor/Utils/BoneRendererUtils.cs" line="479">./Library/PackageCache/com.unity.animation.rigging@1.2.1/Editor/Utils/BoneRendererUtils.cs:479</a>
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityManager.VisibilityChanged()
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityManager.InternalStructureChanged()
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityState.Internal_InternalStructureChanged()
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityManager.IsHidden()
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityHierarchyGUI.DrawGameObjectItemVisibility()
    UnityEditor.CoreModule.dll!UnityEditor::SceneVisibilityHierarchyGUI.DoItemGUI()
    UnityEditor.CoreModule.dll!UnityEditor::GameObjectTreeViewGUI.DoItemGUI()