Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Generic UI Lists

Discussion in 'Assets and Asset Store' started by OneManEscapePlan, May 30, 2019.

  1. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    218
    EquipmentList1.png

    EditorScreenshot Cropped.png

    https://assetstore.unity.com/packages/tools/gui/generic-ui-lists-146463

    The Generic UI List framework gives you a set of extensible generic base classes, which provide all of the core functionality you need to display dynamic lists for any type of data using Unity's UI system. Create flexible, dynamic lists in minutes, from just a prefab and minimal scripting.

    * Clear separation of UI and data using an MVC-style architecture
    * Add or remove items at any position in the list at any time
    * Built-in object pooling for better performance
    * Optional support for scrolling to a specific item or index (when placed in a ScrollRect)
    * Optional support for user selection of items in the list
    * Support for binding using UnityEvents, allowing changes to an item model to be automatically reflected in the UI
    * Four included examples illustrate how to set up and use UI lists

    Creating a list is simple: you typically will only need to write a short class that extends UIListItemView and a one-line class extending UIListController, then create a prefab for the item view. A basic understanding of C# generics is recommended.

    Generic UI Lists is a high-quality framework developed by a professional software engineer in the U.S. You can expect clean, modular code that is well-written and highly flexible, as well as exceptional documentation written in perfect English. My goal is to give you a solid foundation that lets you focus on building your game, without ever making you bang your head on your desk in frustration!
     
  2. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    218
    Version 1.0.1 (5-31-19)
    - Expanded documentation with section on the list controller API
    - RemoveItemAt() returns a bool indicating whether the item was found and removed
     
  3. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    218
    Version 1.1.0 (11-20-19)
    - Renamed UIListControllerBase to UIListController
    - Added new abstract base class AbstractUIListController
    - Added new beta feature, Virtualized lists, which offers much better performance for lists with hundreds or thousands of items

    Upgrade instructions:
    - Remove any previous version before installing version 1.1.0
    - Any classes you created that extended
    UIListControllerBase
    will need to be updated to extend
    UIListController
    instead.
     
  4. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    218
    Version 1.1.2 (5-27-20)
    - List Controllers: changed type of "Data" property from ICollection to IEnumerable for greater flexibility.
    - In example scripts, initialize serialized references with null to fix compiler warnings
     
  5. XCPU

    XCPU

    Joined:
    Nov 5, 2017
    Posts:
    145
    This works really nice. Is there any way to select an item through script without the user clicking?
     
  6. XCPU

    XCPU

    Joined:
    Nov 5, 2017
    Posts:
    145
    Figured it out, added to SelectionManager, and called from the Inventory Example script.
    Code (CSharp):
    1.         public void Test_me(int index) {
    2.             InventoryListItemView view = controller.GetViewAt(index);
    3.             view.Click();
    4.         }
    5.  
    works like a charm, used when user clicks on object and GUI pops up with it already selected from list. nice!