Skip to content

Array

[Array] attribute used for drawing flexible arrays.


Support Types

Type Description Example
T[] Default C# array string[]
List<T> Collection generic List List<string>

Info

Where T is type of array elements.


Parameters

Parameter Name Description Arguments
ElementLabel Custom element label display format. {index} {niceIndex}
CountLabel Custom element count label display format. {count}

Examples

[Array]
public int[] values;

[Array(ElementLabel = "User Name: {niceIndex}")]
public List<string> names;

[Array(ElementLabel = null, CountLabel = "{count} Points")]
public Transform[] point;
Note

Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.

using ApexInspector;


Demo

using ApexInspector;
using UnityEngine;

public class ExampleComponent : MonoBehaviour
{
    [Array(ElementLabel = "Material: {niceIndex}", CountLabel = "{count} Items")]
    public Material[] materials;
}

Live-demo

Live demo