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;

[BoxGroup("Toggle/Shown Box")]
public int A, B;

public InfoMessageType EnumField = InfoMessageType.Info;

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;

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;