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

PanelRenderer: Enable Live Update has a very high performance impact

Discussion in 'UI Toolkit' started by Ramobo, Feb 25, 2020.

  1. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
    Only occurs if the UXML field is assigned. Having it enabled:
    • Increases scene load times by several times, from instant to 14 seconds in an otherwise empty scene.
    • If you enter play mode with domain reload enabled, a game window will open. If you already have one open, the new window will turn into "Failed to load" and in general just break everything related to those two windows. This also starts a continuous stream of errors in the console.
    Enabling it also takes 13–14 seconds.

    Tested in 2020.1.0a24 with package 0.0.4-preview.
     
  2. MattM_Unity

    MattM_Unity

    Unity Technologies

    Joined:
    Aug 18, 2017
    Posts:
    45
    Hello Ramobo!

    Thank you for reporting this!

    I successfully reproduced the Game window duplication problem when entering play mode. However, I cannot reproduce the long waiting time when entering play mode or when enabling the live update.

    Could you give me a bit more information about your project setup and UXML content?
     
  3. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
    It had something to do with NoesisGUI (Unity GUI with XAML). Removing it fixed it. However, I do get 6 of the following warning whenever I enable live update:
    Code (CSharp):
    1. SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
    2. UnityEditorInternal.InternalEditorUtility:OnGameViewFocus(Boolean)
    3. UnityEditor.EditorWindow:GetWindow(Type)
    4. Unity.UIElements.Runtime.PanelRenderer:ForceGameViewRepaint() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:462)
    5. Unity.UIElements.Runtime.PanelRenderer:RecreateUIFromUxml() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:450)
    6. Unity.UIElements.Runtime.PanelRenderer:Validate() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:144)
    7. Unity.UIElements.Runtime.PanelRenderer:OnValidate() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:125)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    This one also requires a UXML file assigned, and appears to be independent of any packages or assets.
     
  4. MattM_Unity

    MattM_Unity

    Unity Technologies

    Joined:
    Aug 18, 2017
    Posts:
    45
    Yes, we do have this warning on our side as well when ticking "Enable Live Update".

    This is a known issue, it's been logged and will be fixed!
     
    Ramobo likes this.