Version 2.1.0.0

HideGroupIfAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
public class HideGroupIfAttribute : PropertyGroupAttribute, _Attribute

The HideGroupIf is an attribute that 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.

Inheritance

Constructors

HideGroupIfAttribute(String, Boolean)
Makes a group that can be shown or hidden based on a condition.
public HideGroupIfAttribute(string path, bool animate = true)
Parameters
System.String path

The group path.

System.Boolean animate

If true then a fade animation will be played when the group is hidden or shown.

HideGroupIfAttribute(String, Object, Boolean)
Makes a group that can be shown or hidden based on a condition.
public HideGroupIfAttribute(string path, object value, bool animate = true)
Parameters
System.String path

The group path.

System.Object value

The value the member should equal for the property to shown.

System.Boolean animate

If true then a fade animation will be played when the group is hidden or shown.

Fields

Animate
Whether or not to slide the properties in and out when the state changes.
public bool Animate
Value
The optional member value.
public object Value

Properties

MemberName
Name of member to use when to hide the group. Defaults to the name of the group, by can be overriden by setting this property.
public string MemberName { get; set; }

Methods

CombineValuesWith(PropertyGroupAttribute)
Combines HideIfGroup attributes.
protected override void CombineValuesWith(PropertyGroupAttribute other)
Parameters
PropertyGroupAttribute other

Another ShowIfGroup attribute.