LabelledCollectionAttribute Class

Summary

[Pro-Only] Provides labels for the elements of a collection field to use instead of just calling them "Element X".
Assembly
Kybernetik.InspectorGadgets.dll
Namespace
InspectorGadgets.Attributes
Base Types
  • PropertyAttribute
graph BT Type-->Base0["PropertyAttribute"] Type["LabelledCollectionAttribute"] class Type type-node

Syntax

[System.Diagnostics.Conditional("UNITY_EDITOR")]
public sealed class LabelledCollectionAttribute : PropertyAttribute

Attributes

Type Description
ConditionalAttribute

Constructors

Name Summary
LabelledCollectionAttribute(string) Uses the member with the specified name to determine the labels of the collection elements.

If the member is a collection field, the values in that collection will be used as the element labels.

If the member is a method with a single int parameter and a non-void return type, it will be called with each element index to determine the label.
LabelledCollectionAttribute(string[]) Uses the specified `labels` for the collection elements.
LabelledCollectionAttribute(Type) Uses the value names of the specified `enumType` for the collection elements.

Methods

Name Value Summary
GetLabel(int) string
Get the label to use for the element at the specified `index` in the collection.