@@ -51,34 +51,19 @@ public void OnGUI(Rect position)
51
51
52
52
if ( rawReferenceValue == null )
53
53
return ;
54
-
55
- DrawLine ( position ) ;
54
+
56
55
DrawProperty ( position ) ;
57
-
58
56
previousPropertyPath = Property . propertyPath ;
59
57
}
60
58
61
59
private void DrawProperty ( Rect position )
62
60
{
63
- Rect objectDrawerRect = new Rect ( position ) ;
64
-
65
- EditorGUI . PropertyField ( objectDrawerRect ,
61
+ EditorGUI . PropertyField ( position ,
66
62
RawReferenceProperty ,
67
63
GUIContent . none ,
68
64
true ) ;
69
65
}
70
66
71
- private void DrawLine ( Rect position )
72
- {
73
- Rect line = new Rect ( position )
74
- {
75
- width = 5 ,
76
- yMin = position . yMin + EditorGUIUtility . singleLineHeight ,
77
- x = position . x + EditorGUI . indentLevel * 15 - 9
78
- } ;
79
- EditorGUI . DrawRect ( line , Styles . LineColor ) ;
80
- }
81
-
82
67
protected override void PingObject ( SerializedProperty property )
83
68
{
84
69
// No support for pinging raw objects for now (I guess this would ping the MonoScript?)
@@ -89,7 +74,7 @@ protected override void OnPropertiesClicked(SerializedProperty property)
89
74
{
90
75
if ( RawReferenceValue == null )
91
76
return ;
92
-
77
+
93
78
Type type = RawReferenceValue . GetType ( ) ;
94
79
string typeName = type . Name ;
95
80
@@ -108,12 +93,12 @@ protected override void OnPropertiesClicked(SerializedProperty property)
108
93
109
94
private void AvoidDuplicateReferencesInArray ( )
110
95
{
111
- if ( ! ShouldCheckProperty ( ) )
96
+ if ( ! ShouldCheckProperty ( ) )
112
97
return ;
113
98
114
99
object currentReferenceValue = RawReferenceValue ;
115
100
116
- if ( currentReferenceValue == null )
101
+ if ( currentReferenceValue == null )
117
102
return ;
118
103
119
104
if ( previousReferenceValue == currentReferenceValue )
@@ -127,8 +112,8 @@ private void AvoidDuplicateReferencesInArray()
127
112
128
113
private bool ShouldCheckProperty ( )
129
114
{
130
- return IsPropertyInArray ( Property ) &&
131
- previousPropertyPath != null &&
115
+ return IsPropertyInArray ( Property ) &&
116
+ previousPropertyPath != null &&
132
117
previousPropertyPath != Property . propertyPath ;
133
118
}
134
119
0 commit comments