Beispiel #1
0
        private void OnRemoveElement(ReorderableList list)
        {
            var isIndexValid = (0 <= list.index && list.index < list.count);

            if (!isIndexValid)
            {
                return;
            }
            QuestEditorWindow.ApplyModifiedPropertiesFromSelectedQuestSerializedObject();
            var condition = list.serializedProperty.GetArrayElementAtIndex(list.index).objectReferenceValue as QuestCondition;

            QuestEditorUtility.RemoveReorderableListElementWithoutLeavingNull(list);
            QuestEditorWindow.ApplyModifiedPropertiesFromSelectedQuestSerializedObject();
            AssetUtility.DeleteFromAsset(condition, QuestEditorWindow.selectedQuest);
            OnSelectElement(list);
        }