private static void ShowItems(SerializedProperty item, LevelDistanceEditor editor, bool indent) { if (item.isArray) { if (indent) { EditorGUI.indentLevel += 1; } if (item.isExpanded) { if (item.name == "groupLevelDistances") { editor.RecalculateLevelDistances(); //EditorGUILayout.PropertyField(item.FindPropertyRelative("Array.size")); for (int i = 0; i < item.arraySize; i++) { EditorGUILayout.PropertyField(item.GetArrayElementAtIndex(i), GUIContent.none); } } else { for (int i = 0; i < item.arraySize; i++) { EditorGUILayout.PropertyField(item.GetArrayElementAtIndex(i)); } } } if (indent) { EditorGUI.indentLevel -= 1; } } }
public static void Show(SerializedProperty item, LevelDistanceEditor editor) { EditorGUILayout.PropertyField(item); if (item.isArray) { EditorGUI.indentLevel += 1; if (item.isExpanded) { if (item.name == "groupLevelDistances") { editor.RecalculateLevelDistances(); } for (int i = 0; i < item.arraySize; i++) { EditorGUILayout.PropertyField(item.GetArrayElementAtIndex(i)); } } EditorGUI.indentLevel -= 1; } }