blob: 24a38b3c33b012f16a08383a1a4ebc9744ffd878 (
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
26
27
28
29
30
31
|
// Cristian Pop - https://boxophobic.com/
using UnityEngine;
using UnityEditor;
namespace Boxophobic.StyledGUI
{
public class StyledSpaceDrawer : MaterialPropertyDrawer
{
public float space;
public StyledSpaceDrawer(float space)
{
this.space = space;
}
public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor materialEditor)
{
//EditorGUI.DrawRect(position, new Color(0, 1, 0, 0.05f));
//Material material = materialEditor.target as Material;
GUILayout.Space(space);
}
public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor)
{
return -2;
}
}
}
|