[OnMemberVisible]

Attribute used for specifying a callback method to invoke when the member becomes visible in the inspector.

Examples

[ToggleLeft]
public bool showDetails;

[ShowIf(nameof(showDetails))]
[OnMemberVisible(nameof(OnDetailsShown))]
public string details = "Secret Details";

private void OnDetailsShown()
{
    Debug.Log("Details field became visible");
}