Description
The Value
property of the HideIfAttribute
class specifies the value to test against when determining whether a property should be hidden in the editor. This property is used in conjunction with the PropertyName
property to conditionally hide properties based on the value of another property within the same class.
Usage
To use the HideIfAttribute
, apply it to a property in your class and specify the PropertyName
and Value
properties. The property will be hidden in the editor if the specified property has the specified value.
Example
// Example usage of HideIfAttribute
public class MyComponent : Component
{
[HideIf("IsEnabled", false)]
public float HiddenProperty { get; set; }
public bool IsEnabled { get; set; }
}