private void AddToSortLayerList(ReorderableList list) { base.serializedObject.ApplyModifiedProperties(); InternalEditorUtility.AddSortingLayer(); base.serializedObject.Update(); list.index = list.serializedProperty.arraySize - 1; }
void AddToSortLayerList(ReorderableList list) { serializedObject.ApplyModifiedProperties(); InternalEditorUtility.AddSortingLayer(); serializedObject.Update(); list.index = list.serializedProperty.arraySize - 1; // select just added one }