Manual
The manual explains the concepts of YAUI topic by topic. For the members of each class, see the API reference.
Panels
A panel (YauiPanel) is the root of a YAUI tree. It is also an element: YauiPanel requires a YauiElement on the same GameObject, and that element is the root box of the layout. Elements belong to the nearest panel above them in the hierarchy.
Elements and Styling
An element (YauiElement) is a box of the UI on a GameObject. Its children that have elements are laid out inside it and drawn on top of it, in sibling order.
Layout
YAUI lays out elements with Flexbox, using a port of Yoga. If you know CSS Flexbox or UI Toolkit, you already know most of it. The layout runs on a worker thread with Burst.
Text
YauiText is an element that draws text. It uses Unity's Advanced Text Generator (ATG), the text engine of UI Toolkit, which provides:
Images
YauiImage
Clipping and Masks
YAUI has two ways to hide the parts of the descendants that are outside of an element.
Input
YAUI uses the EventSystem of Unity for input. Pointer events, selection, navigation with a gamepad or a keyboard, and the Input System UI Input Module all work as they do with uGUI.
Controls
5 items
Scripting and Animation
Setters
Custom Shaders
The uber shader covers most looks. When you need something else, set a custom material in YauiElement.Material. It draws the element's own primitives (its box and content, not its children).
Particles and Meshes
Elements draw quads. To draw a ParticleSystem or any other mesh in the draw order of the UI, add a component derived from YauiCustomDraw to an element. Each mesh is a draw call of its own, and the draws of primitives split around it.
Custom Elements
An element can draw content of its own on top of its box, in the same draw call as the other elements: derive from YauiElement and give it primitives. Each primitive is a quad drawn by the uber shader, like the glyphs of YauiText and the images of YauiImage, which are built the same way. An element can also size itself from its content, like a text. This is enough to write a text renderer, an icon font or a chart outside the package.
Performance
YAUI is fast by default. This page explains what costs time, and how to keep it low. For measurements against uGUI and UI Toolkit, see Benchmarks.
Limitations
YAUI chooses constraints to be fast. Some of them differ from uGUI: