UI Toolkit Integration
Requirements: UI Toolkit 1.0.0+ (Unity 2022.2+)
LocalizedLabel
Custom UI Toolkit element for localized text.
UXML Usage:
xml
<ui:UXML xmlns:lexis="Lexis.UIToolkit">
<lexis:LocalizedLabel localization-key="ui.title" />
<lexis:LocalizedLabel table-id="menu" localization-key="start.button" />
</ui:UXML>C# Usage:
csharp
var label = new LocalizedLabel("ui.title");
label.SetArguments(playerName);
root.Add(label);UXML Attributes:
| Attribute | Type | Description |
|---|---|---|
localization-key | string | The translation key |
table-id | string | Optional table identifier |
LocalizedImage
Custom UI Toolkit element for localized sprites/textures.
UXML Usage:
xml
<lexis:LocalizedImage table-id="assets" asset-key="flag-icon" />UXML Attributes:
| Attribute | Type | Description |
|---|---|---|
table-id | string | Asset table identifier |
asset-key | string | Asset entry key |
