ShowIf
Shows a Property when a condition is met.

public bool enableFeature;
[ShowIf(nameof(enableFeature))]
public int featureDependentField;
public bool showWhenFalse;
[ShowIf(nameof(showWhenFalse), true)]
public float hideWhenFalseField;
[ShowIf(string conditionalFieldName, bool hideWhenFalse)]conditionalFieldName: Condition for enabling the Info Box. This must match the name of a boolean. The boolean does not necessarily have to be the property that this attribute modifies.
hideWhenFalse: The property will be hidden if conditionalFieldName is false.
Last updated