Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[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, Inherited = false)]
[Conditional("UNITY_EDITOR")]
public class InlinePropertyAttribute : Attribute, _Attribute
public class InlinePropertyExamples : MonoBehaviour
{
public Vector3 Vector3;
public Vector3Int Vector3Int;
[InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members
public Vector2Int Vector2Int;
}
[Serializable]
[InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members
public struct Vector3Int
{
[HorizontalGroup]
public int X;
[HorizontalGroup]
public int Y;
[HorizontalGroup]
public int Z;
}
[Serializable]
public struct Vector2Int
{
[HorizontalGroup]
public int X;
[HorizontalGroup]
public int Y;
}
public InlinePropertyAttribute()
public int LabelWidth