@@ -124,7 +124,14 @@ static void DrawVectorAction(Rect position, SerializedProperty property)
124
124
static void DrawContinuousVectorAction ( Rect position , SerializedProperty property )
125
125
{
126
126
var vecActionSize = property . FindPropertyRelative ( k_ActionSizePropName ) ;
127
- vecActionSize . arraySize = 1 ;
127
+
128
+ // This check is here due to:
129
+ // https://fogbugz.unity3d.com/f/cases/1246524/
130
+ // If this case has been resolved, please remove this if condition.
131
+ if ( vecActionSize . arraySize != 1 )
132
+ {
133
+ vecActionSize . arraySize = 1 ;
134
+ }
128
135
var continuousActionSize =
129
136
vecActionSize . GetArrayElementAtIndex ( 0 ) ;
130
137
EditorGUI . PropertyField (
@@ -142,8 +149,17 @@ static void DrawContinuousVectorAction(Rect position, SerializedProperty propert
142
149
static void DrawDiscreteVectorAction ( Rect position , SerializedProperty property )
143
150
{
144
151
var vecActionSize = property . FindPropertyRelative ( k_ActionSizePropName ) ;
145
- vecActionSize . arraySize = EditorGUI . IntField (
152
+ var newSize = EditorGUI . IntField (
146
153
position , "Branches Size" , vecActionSize . arraySize ) ;
154
+
155
+ // This check is here due to:
156
+ // https://fogbugz.unity3d.com/f/cases/1246524/
157
+ // If this case has been resolved, please remove this if condition.
158
+ if ( newSize != vecActionSize . arraySize )
159
+ {
160
+ vecActionSize . arraySize = newSize ;
161
+ }
162
+
147
163
position . y += k_LineHeight ;
148
164
position . x += 20 ;
149
165
position . width -= 20 ;
0 commit comments