New UI Widgets

New UI Widgets is a set of widgets and UI interactions; it also includes a widgets generator for the custom data types and converter from default Text to TextMeshPro.

Collections:

Widgets can be generated for your custom type with the context menu “Create / New UI Widgets / Generate Widgets”
Virtualization (recycling) supported: game objects are created for visible items only.

Containers:

Dialog:

Controls:

Input:

Other:

Interactions:

Works with:

* not available on platforms with restricted access to the file system (like WebGL and Windows Store/UWP)

Asset Store
Demo
Documentation

Changelog

v1.17.15

  • InputAdapter: added workaround to properly update layout because TMP_InputField does not call LayoutRebuilder.MarkLayoutForRebuild() when it should be
  • ListView: the RetainScrollPosition option now correctly works with the enabled ReversedOrder option
  • Project Settings: removed performance impact on enter/exit play mode
  • Rating: fixed error on Value = 0
  • Rating: now interactable works properly
  • SafeArea: added OnScreenChange event with information about borders
  • Swipe: added OnTap event
  • UIThemes: added the “Attach UI Only” option in “Project Settings… / UI Themes”, if enabled ThemeTarget component will be added only to game objects with RectTransform component

v1.17.14

  • COMPATIBILITY-BREAKING CHANGES: methods Updater.RunOnce(Action) and Updater.RunOnceNextFrame(Action) replaced with methods Updater.RunOnce(UnityEngine.Object owner, Action) and Updater.RunOnceNextFrame(UnityEngine.Object owner, Action)
  • added ListViewDefaultItemAutoResize: automatically changes item instances size on ListView resize, used when only one item should be visible
  • InputFieldAdapter: added the SetTextWithoutNotify(string text) method
  • EasyLayout: added warning when one of the objects in the same row has relative width (or one of the objects in the same column has relative height)
  • EasyLayout: added IgnoreLayoutElementSizes option: if enabled ILayoutElement options will be ignored, increases performance without side effects if ChildrenWidth and ChildrenHeight are not controlled
  • EasyLayout: added Hex layout
  • ScrollBlock: added ScrollBlockResizer component to resize ScrollBlock items to display specified item count independent of size
  • TreeView: fixed bug in the TreeViewDropSupport components
  • UIThemes: now support addressable assets, support can be enabled in “Project Settings… / UI Themes”
  • UIThemes: Theme: added the AddressableSupport option, addressable assets can be preloaded with PreloadAddressable() or PreloadAddressable(VariationId) methods
  • UIThemes: now requires references to the Unity.Addressables and Unity.ResourceManager in the UIThemes assembly definition
  • UIThemes: now requires reference to Unity.Addressables.Editor in the UIThemes.Editor assembly definition

v1.17.13

  • improved Assembly Definitions support
  • ListView: reduced the SetData() calls for the item instances to improve performance
  • ListView: fixed bug with DataSource.Clear()
  • TreeView: improved RetainScrollPosition support

v1.17.12

  • added ScrollRectAutoScroll component: allows scrolling content during drag&drop when the pointer is in less than a specified distance from the border
  • ListView: fixed ReversedOrder for the horizontal direction
  • Drag: added the DragDelay option - how many seconds must pass from the click to the start of dragging
  • Drag: added the RedirectDragToScrollRect option - redirects the drag events to the parent ScrollRect if the drag starts before DragDelay time is passed

v1.17.11

  • ListView: scroll no more “jump” when dragging backward and item size is changed
  • Widgets Generator: fixed bug occurring when the default theme is not specified

v1.17.10

  • COMPATIBILITY-BREAKING CHANGES: ActivateInputField() method renamed to Activate() in the IInputFieldProxy interface
  • added DataLoader class to simplify loading and caching data
  • Accordion: added Interactable option
  • CenteredSlider: added Interactable and PointerButton options
  • ColorPicker: added Interactable option
  • Combobox: added Interactable option
  • Combobox: added RepositionListView option, if enabled ListView is automatically positioned to be completely visible if partially hidden by the bottom or right side of the screen
  • Combobox: added ChangeRounderCorners option, if enabled then corner radiuses will be changed to match the repositioned ListView
  • FileListViewPath: added Interactable, DisabledColor, and PointerButton options
  • ListView: added LoopedNavigation option, enabled by default, if enables/disables navigation from first to last item and vice versa
  • ListView: added MultipleSelectRequireKeys option, disabled by default, items selection will work similarly to file explorer if enabled
  • ListView: added RequireVisible option, number of visible items from current item to border on navigation
  • ListView: scroll no more “jump” when scrolling backward when the item size is changed
  • ListView: the LoopedList option now works correctly with items of variable sizes
  • ListViewPaginator: fixed bug with empty ListView and incorrectly detected page in some cases
  • OpenContextMenu: added Interactable and PointerButton options
  • Paginator: added Interactable option
  • SliderScroll: no more change Slider value if it is not interactable
  • Tabs: added TabsScroll component to toggle tabs with mouse scroll
  • TreeNode: fixed incorrect deserialization
  • UI Themes: fixed ThemeTarget bug caused by removed component
3 Likes

Hi ilih
Im trying to use the combobox widget, but i have issues with using a scaling canvas (“Scale With Screen Size”) and different aspects.
The listbox items seem to ignore the resolution scale of the canvas entirely, meaning that the added items are either too small or too large for the listview.

Replace line 245 in ListViewBase.cs
old line

                x.transform.SetParent(Container);

new line

                x.transform.SetParent(Container, false);

Perfect, Worked like a charm.

Hi ilih
Still learning from the documentation, but i encountered some minor issues though that you might want to look at:

  1. List View doesnt have clear method, Listview.Items.Clear does nothing.
  2. Listview remove worked as workaround, but that method only works with strings, the remove(listviewitem) is broken
  3. Combobox should also close if you clicked outside the list. ( standard combobox behavior )
  4. in a combobox, when selecting the currently selected, it does not close the combobox but instead deselects the item instead.

Clear method will be added with next update.
Workaround for ListView

        listView.Strings = new List<string>();

Workaround for ListViewIcons

        listViewIcons.Items = new List<ListViewIconsItemDescription>();

Misprint with access modifiers.
ListViewBase.Remove(ListViewItem) should be protected, not public.
ListViewCustom.Remove(TItem item) should be public, not protected.

Will be available with next update.

Quick fix for this
Replace line 282 in ListViewBase.cs
old line

if (IsSelected(index))

new line

if (IsSelected(index) && Multiple)

Replace line 289 in ListViewBase.cs
old line

if (selectedIndex!=-1)

new line

if ((selectedIndex!=-1) && (selectedIndex!=index))

Replace line 346 in ListViewBase.cs
old line

if (IsSelected(index))

new line

if (IsSelected(index) && Multiple)

24 Hour Deal: 50% off New UI Widgets

is this mobile (android and ios) ready?

Does the list view pool renderers and only use game objects for visible elements? or does it populate the list with game objects for every element?

Works on Android. It don’t have platform specific code, so it should works on iOS too.
You can try Android Demo (This demo may have problem with devices don’t supported non-power-of-2 textures)

For every element. Working on using game objects only for visible elements.

Are the UI widgets controller friendly?

No.

Fixed in version 1.3.1. It’s already released.

hi
does this come with (or can you add if not) a working knob (like a volume control knob).

thanks

No.

I’ll think about it.

well that’s not much good to me is it! will you add it or not? if so ill buy, if not i wont, please could you give a definitive answer?

thanks

It takes some time to research, so I’ll give answer at Tuesday or Wednesday.

How do I pragmatically (using C#) add elements (new icons and text) to the ListViewIcons widget?

Jason

Create one or more ListViewIconsItemDescription and add them with ListViewIcons.Add or ListViewIcons.Items.

using UnityEngine;
using System.Collections.Generic;
using UIWidgets;

public class TestListViewIcons : MonoBehaviour {
    [SerializeField]
    ListViewIcons listViewIcons;

    [SerializeField]
    Sprite icon;

    [SerializeField]
    List<Sprite> icons = new List<Sprite>();

    public void ListViewIconsSamples()
    {
        //Add item
        var new_item = new ListViewIconsItemDescription() {
            Icon = icon,
            Name = "item 1"
        };
        listViewIcons.Add(new_item);
       
        //Add items
        var add_items = new List<ListViewIconsItemDescription>() {
            new ListViewIconsItemDescription() {
                Icon = icons.Count > 0 ?  icons[0] : null,
                Name = "item 1"
            },
            new ListViewIconsItemDescription() {
                Icon = icons.Count > 1 ?  icons[1] : null,
                Name = "item 2"
            },
            new ListViewIconsItemDescription() {
                Icon = icons.Count > 2 ?  icons[2] : null,
                Name = "item 3"
            },
        };
        var new_items = listViewIcons.Items;
        new_items.AddRange(add_items);
        listViewIcons.Items = new_items;
       
        //Replace items
        listViewIcons.Items = add_items;
    }
}

Thank you very much for the quick response.

Jason