Skip to content

Commit 2a1cc1c

Browse files
committed
Fix LitJsonEditor
1 parent c87a15e commit 2a1cc1c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

GameFramework/Editor/Other/LitJsonEditor.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,19 @@ private bool JsonDataArrayEditor(JsonData rootJson)
156156
for (int i = 0; i < rootJson.Count; i++)
157157
{
158158
GUILayout.BeginHorizontal("Box");
159-
JsonDataEditor(rootJson[i]);
159+
var updateJsonData = JsonDataEditor(rootJson[i]);
160+
if (updateJsonData != null)
161+
{
162+
rootJson[i] = updateJsonData;
163+
}
160164
GUILayout.EndHorizontal();
161165
}
162166
GUILayout.BeginHorizontal("Box");
163167
GUILayout.FlexibleSpace();
164168
if (GUILayout.Button("+", GUILayout.Width(30)))
165169
{
166170
JsonData newItem = new JsonData();
167-
newItem.SetJsonType(_newArrayJsonType);
171+
newItem.SetJsonType(arrayJsonType);
168172
rootJson.Add(newItem);
169173
}
170174
GUILayout.EndHorizontal();

0 commit comments

Comments
 (0)