string PropertyName { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The PropertyName property of the HideIfAttribute class specifies the name of the property to be tested for conditional visibility. This property is used in conjunction with the Value property to determine whether a particular property should be hidden in the editor inspector based on the value of another property within the same class.

Usage

To use the PropertyName property, assign it the name of the property you want to test against. This is typically used in custom attributes to control the visibility of properties in the editor based on the state of other properties.

Example

// Example usage of HideIfAttribute
public class MyComponent : Component
{
    [HideIf("IsAdvanced", true)]
    public int AdvancedSetting { get; set; }

    public bool IsAdvanced { get; set; }
}