Skip to content

Boilerplate Code Generation, Tabs, Reorderable Manipulator, Built-in USS Exporter

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

ErnSur/UI-Toolkit-Plus

Repository files navigation

UI Toolkit Plus

license UnityVersion openupm HowToInstall

About

Reusable features for UI Toolkit runtime and editor.

UI Code Generation

You can generate a partial C# class from the UXML file.

Given the following UXML:

<ui:VisualElement>
    <ui:Label name="title" />
</ui:VisualElement>
<ui:VisualElement name="menu">
    <ui:Button name="confirm-button" />
</ui:VisualElement>

Tool generates C# script:

partial class UXMLFileName
{
    private Label title;
    private VisualElement menu;
    private Button confirmButton;

    private void AssignQueryResults(VisualElement root)
    {
        title = root.Q<Label>("title");
        menu = root.Q<VisualElement>("menu");
        confirmButton = root.Q<Button>("confirm-button");
    }
}

Style Sheet Exporter

Open from context menu: Window/UI Toolkit/Style Sheet Exporter
Available with Unity 2022.1 and newer

Ever wanted to see how Unity's built-in controls are styled?
With this tool, you can! Export style sheet assets used by Unity Editor to USS files.

Style Sheet Exporter Window

TabGroup, Tab and TabDropdown

Sample project: Samples/Tabs

ReorderableManipulator

Sample project: Samples/ReorderableCards