Michsky – Docs Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 

Modern UI Pack

  • Quick Start
  • How To (FAQs)
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Others & Add-ons
  1. Home
  2. Modern UI Pack
  3. UI Elements
  4. List View
Updated on August 3, 2022

Modern UI Pack

  • Quick Start
  • How To (FAQs)
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Others & Add-ons

List View

Author: admin 238 views

Dynamic List View

Allows you to create dynamic list items using the editor tools. In order to add new items, you can simply click on ‘Add a new list item’ button, change the item settings, and then hit ‘Pre-initialize Items’ to see the changes right away.

Heads up!

Keep in mind that this is an experimental component and is not recommended for use in production. Expect major changes and improvements in the future releases.

Properties

Property Type Function
rowCount
enum

Change the row count of list items.

initializeOnAwake
bool

Create and initialize all list items on awake.

showScrollbar
string

Enable or disable list scrollbar.

itemPreset
GameObject

Required for the creation of list items.

Scripting

				
					using UnityEngine;
using Michsky.MUIP; // MUIP namespace

public class SampleClass : MonoBehaviour
{
    public ListView myList;

    void YourFunction()
    {
        // Create list items at runtime
        ListView.ListItem item = new ListView.ListItem();

        // You can use up to 3 rows
        item.row0 = new ListView.ListRow();
        item.row0.rowIcon = SpriteVar;
        item.row0.rowText = "Row text";
        item.row0.usePreferredWidth = false;
        item.row0.preferredWidth = 50;
        item.row0.iconScale = 1;

        myList.listItems.Add(item);

        myList.rowCount = ListView.RowCount.Two; // Change row count
        myList.InitializeItems(); // Create and initialize all list items
    }
}				
			

Custom List View

This preset is using the default UGUI components.

Click here for scripting.

Tutorial on how to use layout groups.

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

© 2024 Michsky