UI Widgets is a collection of useful base ui scripts. Some of our assets include this packge and extend from the base classes.
UIWidget is responsible for the management of widgets as well as animating them. Your custom widgets should extend from this class or from child classes. This way you can always track existing widgets by name in your game.
You can add a callback to control other elements of your game when dealing with a widget. Enable/Disable game objects, call a custom method if this widget is shown or closed.
|Name||Enter a name of the widget to be able to find it using WidgetUtility.Find<Type>(Name);|
|Priority||Organize your widgets by priority.|
|Key Code||Setup a KeyCode to show and hide the widget.|
|Ease Type||Animation easing type.|
|Duration||The duration of the animation.|
|Show Sound||SoundClip to play when the widget is shown.|
|Close Sound||SoundClip to play when the widget is closing.|
|Focus||Brings the widget to front.|
|Deactivate On Close||Disables the GameObject when the widget is closed. Increases performance because
the widget does not need to redraw when the canvas is dirty.