Search Unity

UIElements System Overview and Orientation?

Discussion in 'UI Toolkit' started by SonicBloomEric, Oct 30, 2019.

  1. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    1,089
    I've been really trying to wrap my head around what's going on with UIElements but the current documentation reads like "Notes I need to remember when developing this" that were written by somebody working on UIElements.

    What I'm missing is a system overview and orientation guide. Specifically, such a document should provide the following:
    • What are the building blocks behind the scenes of UIElements?
    • How do the different parts of UIElements work together?
    • What programming conventions are used in UIElements?
    As a new user of UIElements, the manual gives a brief overview of the "Visual Tree", the "Layout Engine", and then immediately dives into the UXML format. There doesn't appear to be an introduction with basic definitions of each facet of the system and, critically, how they are supposed to work together.

    That UXML Format document is particularly egregious in that it simply says "hey, do this" without first explaining what you are doing or why. When you encounter the code in the "Defining attributes on elements" section for the first time, you literally have no idea why that code exists or what it's doing. It looks like meaningless complex magic. While it does help that there is some description below the code example, it still feels incomplete: "Okay... so you told me how this code works. But... what if I'm trying to do something slightly different? I... still have no idea what other options are available, let alone how to use them..."

    Is this getting a deeper pass?
     
    xeleh likes this.
  2. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    1,089
    As another example, the "Customizing a UXML name" section in the UXLM format documentation starts talking about assemblies without first telling the reader "Hey, by the way - this only applies if you're compiling your code into an assembly format."

    Which... is an important detail if you're really trying your best to help rather than confuse the reader.
     
  3. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    Hello,

    We are aware of the limitations and problems of the current documentation.

    This is definitely going to get a deeper pass, with the help of Unity's documentation team.

    Stay tuned!