LabelTextAttribute

LabelText is used to change the labels of properties.

Use this if you want a different label than the name of the property.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)448, AllowMultiple = False, Inherited = True)]
[DontApplyToListElementsAttribute]
public class LabelTextAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.5.0

See Also

Constructors

Definition Description
LabelTextAttribute(string) Give a property a custom label.

Properties

Return Type Definition Description
string Text The new text of the label.

Example

The following example shows how LabelText is applied to a few property fields.

public MyComponent : MonoBehaviour
{
	[LabelText("1")]
	public int MyInt1;

	[LabelText("2")]
	public int MyInt2;

	[LabelText("3")]
	public int MyInt3;
}