Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Assertion Failed

Discussion in 'UI Toolkit' started by Kan15hkSMT, Jun 2, 2020.

  1. Kan15hkSMT

    Kan15hkSMT

    Joined:
    Nov 13, 2019
    Posts:
    37
    I keep getting the following error:

    Assertion failed
    UnityEngine.UIElements.VisualTreeAsset:CloneTree(VisualElement)
    Unity.UIElements.Runtime.PanelRenderer:RecreateUIFromUxml() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:441)
    Unity.UIElements.Runtime.PanelRenderer:Initialize() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:220)
    Unity.UIElements.Runtime.PanelRenderer:Awake() (at Library/PackageCache/com.unity.ui.runtime@0.0.4-preview/Runtime/PanelRenderer.cs:247)
    smt.uielements.SessionSelectionUIEController:Awake() (at Assets/_TeamAnalytics_/UI/UIElements/Scripts/SessionSelectionUIEController.cs:109)


    First line of the code below is line 108:
    Code (CSharp):
    1. private new void Awake() {
    2.             base.Awake();
    3.             UIElementsHelpers.SetPanelRendererEnableState(this, false);
    4.             this.panelTransform = gameObject.transform;
    5.             BindScreen();
    6.         }
    Any suggestions?
     
  2. GuillaumeLeplang

    GuillaumeLeplang

    Joined:
    Sep 3, 2019
    Posts:
    8
    Try it in the Start() method instead of the Awake, I think I had this issue at some point