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. Dismiss Notice

UI Toolkit controls not being displayed

Discussion in 'UI Toolkit' started by cedvdb, Nov 19, 2020.

  1. cedvdb

    cedvdb

    Joined:
    Jul 6, 2017
    Posts:
    6
    I'm trying to use the UI toolkit but the controls are not displayed. The containers however are.

    Code (csharp):
    1. <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
    2.     <ui:VisualElement style="height: 223px; width: 278px; background-color: rgb(255, 0, 0);">
    3.         <ui:Button text="Button" display-tooltip-when-elided="True" style="height: 205px; width: 278px;" />
    4.     </ui:VisualElement>
    5. </ui:UXML>
    6.  

    repo for repro: https://github.com/cedvdb/drop3D
     
  2. cedvdb

    cedvdb

    Joined:
    Jul 6, 2017
    Posts:
    6
    It seems like it's because the font isn't available, but that same font was available in a test project I launched.
     
  3. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    666
    Hello, the repo you shared cannot be found and without more details as to what you're trying to do (is this set to a UIDocument? or is it an Editor Window?) it's hard to troubleshoot! Can you give us more details? Thanks!