summaryrefslogtreecommitdiff
path: root/Assets/Art/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledSpaceDrawer.cs
blob: 267fe54f7a27aebeb0758764a57f467c0073a838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Cristian Pop - https://boxophobic.com/

using UnityEngine;
using UnityEditor;

namespace Boxophobic.StyledGUI
{
    [CustomPropertyDrawer(typeof(StyledSpace))]
    public class StyledSpaceAttributeDrawer : PropertyDrawer
    {
        StyledSpace a;

        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            a = (StyledSpace)attribute;

            GUILayout.Space(a.space);
        }

        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            return -2;
        }
    }
}