Version 2.1.0.0

Odin has a dedicated attribute overview with examples

LabelWidthAttribute class

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)]
public class LabelWidthAttribute : Attribute, _Attribute

LabelWidth is used to change the width of labels for properties.

Inheritance
  • System.Object
  • System.Attribute
  • LabelWidthAttribute
Example

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

public MyComponent : MonoBehaviour
{
	[LabelWidth("3")]
	public int MyInt3;
}
See Also

Constructors

LabelWidthAttribute(Single)
Give a property a custom label.
public LabelWidthAttribute(float width)
Parameters
System.Single width

The width of the label.

Fields

Width
The new text of the label.
public float Width