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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question Unable to create UIDocument entry in Hierarchy

Discussion in 'UI Toolkit' started by niel-archer, Sep 20, 2021.

  1. niel-archer

    niel-archer

    Joined:
    Nov 29, 2016
    Posts:
    17
    I'm using 2021.2 20f1, which if I've read the announcements correctly has support for UI Toolkit/Builder (editor and runtime) support built in (i.e. no need for packages). However I cannot find an option to add a UIDocument object to the hierarchy (as suggested here https://docs.google.com/document/d/1C_c5hrqOrkgYjmD3s04vcKfk-aQ8n007Ti7vUR51SeQ/). In fact there is no UI Toolkit entry in the GameObject menu.

    Right-clicking in the hierarchy pane also shows no UI Toolkit entry. Am I incorrect that these features are built-in to the 2021.2 builds and I actually need to add the preview packages?
     
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    666
    Hello! Are you sure you're on 2021.2? Latest for that version is 2021.2.0b12, and 2021.1 is actually on 2021.1.21f1 so I believe you may have confused both of them.

    So if you're on 2021.2.0b12 then yes, the UI Toolkit menus should be there in the Hierarchy and Project Views, but if you're on 2021.1.20f1 then you'll need to add the package.

    If you choose to go with 2021.1.20f1 and add the com.unity.ui package, we recommend you also add the com.unity.ui.builder package, even though there's a built-in version as we can guarantee API compatibility when they're both either built-in or both in package version.

    Hope this helps!
     
  3. niel-archer

    niel-archer

    Joined:
    Nov 29, 2016
    Posts:
    17
    Damn, you are correct. I had tried to upgrde to 2021.2 but apparently I failed. Tried it again and all looks good now.
     
    JuliaP_Unity likes this.