Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[Conditional("UNITY_EDITOR")]
public class EnumToggleButtonsAttribute : Attribute, _Attribute
Draws an enum in a horizontal button group instead of a dropdown.
public class MyComponent : MonoBehvaiour
{
[EnumToggleButtons]
public MyBitmaskEnum MyBitmaskEnum;
[EnumToggleButtons]
public MyEnum MyEnum;
}
[Flags]
public enum MyBitmaskEnum
{
A = 1 << 1, // 1
B = 1 << 2, // 2
C = 1 << 3, // 4
ALL = A | B | C
}
public enum MyEnum
{
A,
B,
C
}
public EnumToggleButtonsAttribute()