Esempio n. 1
0
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        var state = HiddenAttributeDrawer.IsEnabled(this, property);

        if (state == true)
        {
            EditorGUI.PropertyField(position, property, label, true);
        }
    }
Esempio n. 2
0
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    {
        var state = HiddenAttributeDrawer.IsEnabled(this, property);

        if (state == true)
        {
            return(EditorGUI.GetPropertyHeight(property, label, true) + 2f);
        }

        return(0f);
    }