3 ms·
So now I'm assuming, you're approach would be to just have classes for your custom UI elements. It might just be a Unity thing, but up until they released thei
by 999900000999 5y ago
So now I'm assuming, you're approach would be to just have classes for your custom UI elements.
It might just be a Unity thing, but up until they released their XML UI tools, I could not build a decent UI for the life of me. Basic things like getting buttons to appear where I want them to are very hard without XML
- setr 5y agoIt’s ultimately the same; XML largely maps to a class with attributes (and an identifier/navigation through XPATH) fairly strictly. And it should largely take you the same amount of effort; Div ( button(…) ) And <Div> <button>…</button> </Div> is equivalent. Things like separating your definition from your styling isn’t a feature of HTML/CSS, it’s a feature of the API design — the API just happens to be encoded one way or the other. In-line callbacks vs a selector + callbacks is the same as well (you still need a way to navigate the hierarchy, but XPATH & co. makes just as much sense on an object tree as it does on XML — although with code, you could also just keep the pointer around) I don’t know unity’s API’s, but I’d bet that their GUI API doesn’t actually look much like their XML API; and that if they did, you’d have had just as much, or little, trouble picking it up.