blob: 1f1d2e40ce659fb16a8e62e4a5050b51e0df8100 (
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(StyledIndent))]
public class StyledIndentAttributeDrawer : PropertyDrawer
{
StyledIndent a;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
a = (StyledIndent)attribute;
EditorGUI.indentLevel = a.indent;
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return -2;
}
}
}
|