- Notifications
You must be signed in to change notification settings - Fork4
Extension Methods to better build UI through code using Unity UIElements
License
NotificationsYou must be signed in to change notification settings
ltmx/Unity.UIToolkit.Extensions
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Extension Library for Unity UIElements
Looks :
publicstaticTextFieldCreateInputTextField(thisVisualElementcontainer){varrow=container.Row();row.Image().USS("logo");varinputTextField=row.TextField().Multiline(true).Value(AthenaSettings.DefaultPrompt).ToolTip("[Shift + Enter] to SEND\n[Esc] to STOP chat").Placeholder("Type your message here").HidePlaceholderOnFocus(true);returninputTextField;}
Unity > Package Manager > Install via Git URL > pastehttps://github.com/ltmx/Unity.UIToolkit.Extensions.git
- com.unity.mathematics
- com.unity.modules.uielements (built in package)
element.Button();element.TextField();element.Label();
element.USS("my-style");element.RemoveUSS("my-class");element.ClearUSS("my-class");element.WhereClassListContains("my-class");element.FirstElementWithClass("my-class");// of course everything links togethermyButton.WhereClassListContains("unity-text-element").ClearUSS();
publicPathField(string name):base(name){varbutton=newActionButton(OpenPathInExplorer).USS("open-button").FlexShrink(1).FlexGrow(1).AlignSelf(Align.Center).Margin(0).MarginRight(8).Size(24).BackgroundSize(BackgroundSizeType.Contain);Insert(1,button);}
About
Extension Methods to better build UI through code using Unity UIElements
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published