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 Is uitoolkit mature ? And some question

Discussion in 'UI Toolkit' started by Nephenris, Jul 12, 2023.

  1. Nephenris

    Nephenris

    Joined:
    Feb 8, 2023
    Posts:
    4
    i started a small project , a city builder.
    I will have a lot of "windows" to display data.
    Without regarding performance, i started by creating a general main ui then several GO to host uidocument for each different "popup" i will have.
    But i am not convinced this the good way to manage ui. Should i have only one big ui document with all visual elements in it, then ide some elements depending of current game state ?

    Also i notice perhaps a lot of pb i have with uitoolkit, and i wonder if it is mature ?

    for exemple i have some decrepencies between ui builder and some items like scroll view for example : in game mode in editor, my scroll do not have anu style and are ugly - i did not check how it behaves once game built however.

    I have also some pb with parent/child composant, setting root ui élément visible, then some childs visible, then root invisible : Child are still visible !

    So should i consider using an older ui systems perhaps more stable and mature ?
     
  2. dlorre

    dlorre

    Joined:
    Apr 12, 2020
    Posts:
    700
    I've made a window system for my app but I don't like it at all and changed it to multiple additive scenes. The reason why I don't like it is because of the very poor gamepad support, if you don't need gamepad support then you don't need to worry about it, UI Toolkit has been designed for mouse and keyboard, and maybe touch screen devices but not for gamepad.

    Yes visibility does not cascade but setting display=none works with child.
     
  3. Nephenris

    Nephenris

    Joined:
    Feb 8, 2023
    Posts:
    4
    i plan to use keyboard/mouse.
    thks for info about visibility.

    as for having one Go with one big ui instead of several Go owning each a part of ui with an uidocument, any opinion ?
     
  4. dlorre

    dlorre

    Joined:
    Apr 12, 2020
    Posts:
    700
    You can use Resources.Load<VisualTreeAsset>(treeName) to add an uxml to any document on the fly.
     
    Nephenris likes this.