/************************************************************************************************************************/ /// <summary> /// Called when reordering states in the list to ensure that any other relevant arrays have their /// corresponding elements reordered as well. /// </summary> protected virtual void OnReorderList(ReorderableList list, int oldIndex, int newIndex) { CurrentSpeeds.MoveArrayElement(oldIndex, newIndex); var syncCount = CurrentSynchronizeChildren.arraySize; if (Math.Max(oldIndex, newIndex) >= syncCount) { CurrentSynchronizeChildren.arraySize++; CurrentSynchronizeChildren.GetArrayElementAtIndex(syncCount).boolValue = true; CurrentSynchronizeChildren.arraySize = newIndex + 1; } CurrentSynchronizeChildren.MoveArrayElement(oldIndex, newIndex); }
/************************************************************************************************************************/ /// <summary> /// Called when reordering states in the list to ensure that any other relevant arrays have their /// corresponding elements reordered as well. /// </summary> protected virtual void OnReorderList(ReorderableList list, int oldIndex, int newIndex) { CurrentSpeeds.MoveArrayElement(oldIndex, newIndex); }