Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[DontApplyToListElements]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public class LabelTextAttribute : Attribute, _Attribute
LabelText is used to change the labels of properties.
Use this if you want a different label than the name of the property.
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;
}
public LabelTextAttribute(SdfIconType icon)
SdfIconType | icon | The icon to be shown next to the property. |
public LabelTextAttribute(string text)
System.String | text | The new text of the label. |
public LabelTextAttribute(string text, SdfIconType icon)
System.String | text | The new text of the label. |
SdfIconType | icon | The icon to be displayed. |
public LabelTextAttribute(string text, bool nicifyText)
System.String | text | The new text of the label. |
System.Boolean | nicifyText | Whether to nicify the label text. |
public LabelTextAttribute(string text, bool nicifyText, SdfIconType icon)
System.String | text | The new text of the label. |
System.Boolean | nicifyText | Whether to nicify the label text. |
SdfIconType | icon | The icon to be displayed. |
public SdfIconType Icon
public string IconColor
public bool NicifyText
public string Text