@@ -9,14 +9,14 @@ namespace UnityForge.Editor
9
9
public class AssetPathDrawer : PropertyDrawer
10
10
{
11
11
private const string ResourcesFolderPath = "/Resources/" ;
12
- private const int ShownPathHeight = 16 ;
12
+ private const int PathPreviewHeight = 16 ;
13
13
14
14
public override void OnGUI ( Rect position , SerializedProperty property , GUIContent label )
15
15
{
16
16
var assetPathAttribute = ( AssetPathAttribute ) attribute ;
17
- if ( assetPathAttribute . ShowFullPath )
17
+ if ( assetPathAttribute . ShowPathPreview )
18
18
{
19
- position . height -= ShownPathHeight ;
19
+ position . height -= PathPreviewHeight ;
20
20
}
21
21
22
22
if ( ! IsPropertyTypeValid ( property ) )
@@ -68,20 +68,19 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
68
68
}
69
69
}
70
70
71
- if ( assetPathAttribute . ShowFullPath )
71
+ if ( assetPathAttribute . ShowPathPreview )
72
72
{
73
- position . y += ShownPathHeight ;
73
+ position . y += PathPreviewHeight ;
74
74
position = EditorGUI . PrefixLabel ( position , new GUIContent ( " Asset Path Preview" ) ) ;
75
-
76
75
EditorGUI . LabelField ( position , String . Format ( "\" {0}\" " , assetPath ) ) ;
77
76
}
78
77
}
79
78
80
79
public override float GetPropertyHeight ( SerializedProperty property , GUIContent label )
81
80
{
82
- if ( IsPropertyTypeValid ( property ) && ( ( AssetPathAttribute ) attribute ) . ShowFullPath )
81
+ if ( IsPropertyTypeValid ( property ) && ( ( AssetPathAttribute ) attribute ) . ShowPathPreview )
83
82
{
84
- return base . GetPropertyHeight ( property , label ) + ShownPathHeight ;
83
+ return base . GetPropertyHeight ( property , label ) + PathPreviewHeight ;
85
84
}
86
85
else
87
86
{
0 commit comments