private void ListModified(ReorderableList list) { list.serializedProperty.serializedObject.ApplyModifiedProperties(); switch (_currentListModification) { case LIST_MODIFICATION.ADD: _pathWayNavMeshUI.UpdatePathAt(_indexCurrentModification); break; case LIST_MODIFICATION.SUPP: if (list.serializedProperty.arraySize > 1) { _pathWayNavMeshUI.UpdatePathAt((list.serializedProperty.arraySize + _indexCurrentModification) % list.serializedProperty.arraySize); } break; case LIST_MODIFICATION.DRAG: _pathWayNavMeshUI.UpdatePathAt(list.index); _pathWayNavMeshUI.UpdatePathAt(_indexCurrentModification); break; default: break; } _currentListModification = LIST_MODIFICATION.OTHER; }