Conditional Show

Customizing the inspector in most easiest way

ConditionalShow is more powerful than other ConditionalHide attribute. It is more flexible that supporting more conditions.

[SerializeField]
private bool isShow;
[SerializeField, ConditionalShow("isShow")]
private float showValue;
// single boolean
[ConditionalShow("isShow")]

// false as condition
[ConditionalShow("isHide", false)]

// multiple boolean
[ConditionalShow("isShow", "isReallyShow")]

// enum value
[ConditionalShow("myEnum", MyEnum.Show, ...)]

// invert enum value
[ConditionalShow("myEnum", true, MyEnum.NotShow, ...)]

// boolean and enum value
[ConditionalShow("isShow", "myEnum", MyEnum.Show, ...)]

// boolean and invert enum value
[ConditionalShow("isShow", "myEnum", true, MyEnum.NotShow, ...)]

Last updated