[TableList]

Displays an array as a table with columns for each child property.

Support Types

Type
Description

T[]

Array of elements

List<T>

List of elements

Parameters

Parameter Name
Arguments
Description

ColumnWidths

float[]

Optional per-column widths in pixels. If not specified or value <= 0, width is auto. The array index corresponds to the column index.

HideFoldoutWhenEmpty

bool

When true and the array is empty, the foldout header arrow and label are hidden. The header container and add button remain visible.

InactiveWhenEmpty

bool

When true and the array is empty, the header button are unclickable. The header container and add button remain visible.

ShowCount

bool

When true, the count of the array is shown in the header.

Examples

using System;
using UnityEngine;
using RenownedGames.Apex;

[Serializable]
public class User
{
    public string name;
    public int age;
    public bool isAdmin;
}

public class TableListExample : MonoBehaviour
{
    [TableList]
    public User[] users;

    [TableList(ColumnWidths = new float[] { 100, 50, 0 })]
    public User[] customWidthUsers;
}

Last updated