File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
GameFramework/Editor/Other Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -156,15 +156,19 @@ private bool JsonDataArrayEditor(JsonData rootJson)
156
156
for ( int i = 0 ; i < rootJson . Count ; i ++ )
157
157
{
158
158
GUILayout . BeginHorizontal ( "Box" ) ;
159
- JsonDataEditor ( rootJson [ i ] ) ;
159
+ var updateJsonData = JsonDataEditor ( rootJson [ i ] ) ;
160
+ if ( updateJsonData != null )
161
+ {
162
+ rootJson [ i ] = updateJsonData ;
163
+ }
160
164
GUILayout . EndHorizontal ( ) ;
161
165
}
162
166
GUILayout . BeginHorizontal ( "Box" ) ;
163
167
GUILayout . FlexibleSpace ( ) ;
164
168
if ( GUILayout . Button ( "+" , GUILayout . Width ( 30 ) ) )
165
169
{
166
170
JsonData newItem = new JsonData ( ) ;
167
- newItem . SetJsonType ( _newArrayJsonType ) ;
171
+ newItem . SetJsonType ( arrayJsonType ) ;
168
172
rootJson . Add ( newItem ) ;
169
173
}
170
174
GUILayout . EndHorizontal ( ) ;
You can’t perform that action at this time.
0 commit comments