Skip to content

About

Documentation & Samples for WeaveUI

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weave UI

Weave UI is a toolkit package for Unity 6 runtime.

  • Tailwind utility classes on design tokens.
  • A themed controls library, including game controls such as cooldown rings, steppers, toasts, dialogue text and input prompts, plus 9 slice art skins that restyle the same markup.
  • Screens bound to view models, with transitions and modals.
  • A virtualised inventory grid with drag and drop.
  • A fluent C# builder, and an interaction system that hands each handler exactly the values it asks for.
  • Right-to-left layout and Unity Localization support.

Installing

Add to your Unity Assets via the Unity Asset Store.

Documentation

The documentation covers every part of Weave UI: getting started, screens, data binding, interaction, styling, controls, the grid, the C# builder, theming, skins, and localization and right-to-left. The changelog lists what changed in each version.

Samples

Sample Shows
Game HUD Utility-class layout, bars driven by bound percentages, a recoloured hotbar grid, toasts built in C#, a pointer-transparent overlay
Settings menu Tabs, two-way binding for every control, Apply/Revert with dirty tracking, key rebinding, live light/dark switching, a modal
Shop + inventory A vendor grid and a multi-slot bag, drag to buy and sell with custom drop rules, injected handler arguments, a confirmation modal
Builder + themes A screen written only in C#, then restyled five ways: dark, light, a palette of variable overrides, and art skins from Kenney and from Synty art you own

How a Weave screen fits together

[ScreenLayout("WeaveUISamples/SettingsMenu/Settings")]        
// UXML under a Resources folder
public sealed class SettingsScreen : Screen<SettingsViewModel>  
// The view model is the root's data source
{
    public SettingsScreen(SettingsViewModel viewModel) : base(viewModel) { }

    // Settings.uxml has <weave:Button click="AskDefaults" />; an [OnClick("defaults")] attribute works too.
    void AskDefaults() => Manager.Push(new ConfirmDialog(...));
}
<ui:VisualElement class="flex-row items-center gap-3 p-4 rounded-xl bg-slate-900 hover:bg-slate-800">
    <weave:Slider low-value="0" high-value="100">
        <Bindings>
            <ui:DataBinding property="value" data-source-path="Master" binding-mode="TwoWay" />
        </Bindings>
    </weave:Slider>
</ui:VisualElement>
  • Layout and style: Tailwind utility classes in the markup (hover:, focus:, active:, disabled: and dark: variants included), plus a small USS file per screen for the rest. Controls take their colours from semantic variables (--weave-primary, --weave-surface, ...), so one palette file restyles everything.
  • Data: view models derive from ViewModel and mark bindable properties with [CreateProperty]. UI Toolkit's runtime binding does the rest.
  • Input: handlers are attributes ([OnClick], [OnCellClick], [OnDrop], ...) or method names in UXML (click="Apply", change="QualityChanged"). They declare the values they want: the item, the slot, the drag, the previous value, modifier keys. Weave injects them.
  • Hosting: one ScreenHost component creates the UI document. It owns the screen stack (push, pop, modals, transitions) and ThemeService (light/dark, palette, skin, text direction).

Requirements

  • Unity 6000.3 or newer.
  • The Weave UI package (dev.nerdova.weaveui), coming to the Unity Asset Store.

The screenshots were captured in Unity 6000.4 at 1920 × 1080.

Credits

All the art in these samples is pre-made by Kenney; none of it is AI-generated.

Kenney

Kenney's packs are CC0 (public domain): no credit is required, but it's given here with thanks.

Pack Used in Changes
Background Elements Remastered (backgroundColorForest.png) Game HUD: the scene behind the HUD, Resources/WeaveUISamples/GameHud/Backdrop.png None to the file; the sample tints it darker at runtime
1-Bit Pack Game HUD and Shop + inventory: the item and currency icons, Resources/WeaveUISamples/<Sample>/Icons/ Cut from the tilesheets and enlarged 4x
UI Pack (RPG Expansion) Builder + themes: the Kenney skin, which comes from Weave UI's Basic Menu sample Hover and focus states lightened, the bar pieces joined into one sprite, the checkbox tick placed on its box

By Kenney (Kenney Vleugels).

Synty Studios (not included)

The Synty skin in the Builder + themes screenshots is built from INTERFACE - Fantasy Menus by Synty Studios. Synty's licence doesn't allow redistributing the art, so this repository contains only the editor script that builds the skin from your own copy. You need your own licence to use it.

About

Documentation & Samples for WeaveUI

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages