Dynamic List UI
Last updated
Last updated
For each value in the Value List, the Dynamic List UI automatically instantiates a cell prefab. Attached to each prefab is a Dynamic Cell UI component, responsible for individual actions like displaying text or images of the value. Consider how this component could be used to create a list of inventory items, where each item has a name and icon displayed in its cell.
Unlike the Dynamic Stepper UI, the Dynamic List UI is clamped and keeps your selection index within its boundaries. It automatically sets to the last index if you try to go beyond and to the first index if you go below.
Target
A game object that will be passed onto the 'On Selection Change' and 'On Refresh' of all generated cells as the target.
Cell Prefab
Reference to prefab with Dynamic Cell UI component attached.
Cell Container
Reference to transform where all prefab cells will be instantiated as its child. If no reference is supplied, self will be the container.
Use Pooling
Whether to reuse the previously generated cells or simply destroy the cells and create a new instances.
Value List
The Value List containing a collection of values to be iterated through by the Dynamic List UI.
Initial Selected Index
An index position of the value that will sets as the initial selection.
Notify Selection Change
Whether to initially run the instructions within the 'On Selection Change' at the start.
Cache Selection
An options to whether to save the selection or not after fetching the Value List.
Forget
Always lose the selection after fetching the Value List.
Preserve Index
Remember the selected index after fetching the Value List, if it still exists. cache index will persist until selection is changed.
Preserve Value
Remember the selected value after fetching the Value List, if it still exists. cache value will persist until selection is changed.
Selection When Lost
An options for what to select when the selection is lost after fetching the Value List. This won't notify On Selection Change.
On Selection Change
List of instructions that will be executed when the value selection is changed.