Show If Group Attribute

ShowIfGroup allows for showing or hiding a group of properties based on a condition. The attribute is a group attribute and can therefore be combined with other group attributes, and even be used to show or hide entire groups.

public bool Toggle = true; [ShowIfGroup("Toggle")] [BoxGroup("Toggle/Shown Box")] public int A, B; [BoxGroup("Box")] public InfoMessageType EnumField = InfoMessageType.Info; [BoxGroup("Box")] [ShowIfGroup("Box/Toggle")] public Vector3 X, Y; // Like the regular If-attributes, ShowIfGroup also supports specifying values. // You can also chain multiple ShowIfGroup attributes together for more complex behaviour. [ShowIfGroup("Box/Toggle/EnumField", Value = InfoMessageType.Info)] [BoxGroup("Box/Toggle/EnumField/Border", ShowLabel = false)] public string Name; [BoxGroup("Box/Toggle/EnumField/Border")] public Vector3 Vector; // ShowIfGroup will by default use the name of the group, // but you can also use the MemberName property to override this. [ShowIfGroup("RectGroup", Condition = "Toggle")] public Rect Rect;