Ejemplo n.º 1
0
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        WritableAttribute attr = attribute as WritableAttribute;

        GUI.enabled = attr.Result(DrawerUtil.GetTarget(property));
        DrawerUtil.OnGUI(position, property, label);
        GUI.enabled = true;
    }
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        VisibleAttribute attr = attribute as VisibleAttribute;

        if (attr == null || attr.Result(DrawerUtil.GetTarget(property)))
        {
            DrawerUtil.OnGUI(position, property, label);
        }
    }
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    {
        VisibleAttribute attr = attribute as VisibleAttribute;

        if (attr == null || attr.Result(DrawerUtil.GetTarget(property)))
        {
            return(DrawerUtil.GetPropertyHeight(property, label));
        }
        else
        {
            return(0f);
        }
    }