public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        EditorGUI.BeginChangeCheck();
        //base.OnGUI(position, property, label);
        bool guiEnabled = GUI.enabled;
        //   GUI.enabled = true;
        var origIndent = EditorGUI.indentLevel;

        label = EditorGUI.BeginProperty(position, label, property);


        switch (dispModAttr.hidingCondition)
        {
        case DM_HidingCondition.FalseOrNull: hideModeEnabled = CheckHidingConditions(property, false); break;

        case DM_HidingCondition.TrueOrInit: hideModeEnabled = CheckHidingConditions(property, true); break;

        case DM_HidingCondition.None: hideModeEnabled = true; break;
        }
        //Debug.Log(property.name + " - " + dispModAttr.hidingCondition + " - "  + dispModAttr.hidingCondition + " - shouldHide: "+hideModeEnabled);


        if (hideModeEnabled)
        {
            switch (dispModAttr.hidingMode)
            {
            case DM_HidingMode.Hidden: GUI.enabled = false; break;    //

            case DM_HidingMode.GreyedOut: GUI.enabled = false; break;

            case DM_HidingMode.Normal: GUI.enabled = true; break;
                // default: GUI.enabled = true; break;
            }
        }

        if (!hideModeEnabled || dispModAttr.hidingMode != DM_HidingMode.Hidden)
        {
            if (dispModAttr.overrideName)
            {
                label.text = dispModAttr.displayName;
            }

            if (rangeAttribute.IsNull())
            {
                DrawProperties(ref position, property, ref label);
            }
            else
            {
                if (extraLabelLine)
                {
                    MoveElements(ref position, property, ref label);
                }

                DrawSliders(ref position, property, ref label);
            }
        }


        GUI.enabled = guiEnabled;
        EditorGUI.EndProperty();
        EditorGUI.indentLevel = origIndent;
        EditorGUI.EndChangeCheck();
    }