Search Unity

UIElements developer guide

Discussion in 'UIElements' started by antoine-unity, Mar 20, 2019.

  1. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    98
    Hello,

    As the API is going out of experimental in 2019.1 we have improved the developer guide and moved it out of the experimental section.

    Any feedback is appreciated about what you feel is missing or should be further documented.

    We are working on a best practice guide explaining how to best implement custom elements as well as potential performance considerations.

    Thanks.
     
  2. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    530
    The page on uQuery is painfully sparse. Is there more complete documentation with examples anywhere? At the very least there should be examples of how to query objects with different selectors.
     
  3. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    98
    You are right that the uQuery doc is lacking. We will improve this.
     
    Last edited: Mar 27, 2019
    JamesArndt likes this.
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    I'd love to see links to basic examples in that page. How to create a custom inspector using UIElements, how to write an editor window, etc.

    I've seen such examples earlier, but I can't quite remember where they are, so having links in the developer guide would be nice.

    As for now, the developer guide has a ton of information about the parts of the system (visual tree, layout engine, etc.), but no context for any of those things.
     
  5. GilbertoBitt

    GilbertoBitt

    Joined:
    May 27, 2013
    Posts:
    75
  6. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    98
    Sarkahn likes this.
  7. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,762
    Do we have a roadmap for the game UI phase?
     
  8. MakabreGaming

    MakabreGaming

    Joined:
    Mar 30, 2017
    Posts:
    37
  9. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    Okay, so I came back to this now half a year after I wrote my last post. I've recently upgraded an old project to 2019.2, and I was looking at a custom editor for a MonoBehaviour that was behaving kinda weirdly.

    I figured "you know what, why don't I try to rebuild it in UI Elements? It's the new thing, and it looks pretty good". So I googled, and the first hit was the developer guide.

    Now, my goal when opening that page was to figure out how I go about writing a custom editor using UI elements. And there's nothing there. There's all this information about the parts of the system and how they work, but not how you do anything. I think there's some very good reasons to put a hello world very early in the documentation. There are two main things people will use UI elements for; custom editors and editor windows. Those things should be the entry point.

    In other words, the two first links on the developer guide should be "this is how you write a custom editor" and "this is how you write an editor window". That's the most important things, and the natural way to start out understanding the system.
     
  10. MakabreGaming

    MakabreGaming

    Joined:
    Mar 30, 2017
    Posts:
    37
    Those are good points. Meanwhile you can look at these videos



    And this one https://github.com/Unity-Technologies/UIElementsExamples , I haven't checked them out yet but I keep those tabs open for when I have the time.