private void PrefixNames()
        {
            QuestAsset quest = ((QuestAsset)serializedObject.targetObject);

            if (quest == null)
            {
                return;
            }
            ProgressionPointAsset[] progressionPointArray = quest.GetProgressionPoints();
            for (int i = 0; i < progressionPointArray.Length; i++)
            {
                ProgressionPointAsset p = progressionPointArray[i];
                string intFormat        = new string('0', (progressionPointArray.Length / 10) + 1);
                p.name = quest.name + "_" + i.ToString(intFormat) + "|" + p.name;
            }
            EditorUtility.SetDirty(serializedObject.targetObject);
        }
        public void OnDisable()
        {
            QuestAsset quest = (QuestAsset)serializedObject.targetObject;

            if (quest == null)
            {
                return;
            }
            PrefixNames();
            ProgressionPointAsset[] progressionPointArray = quest.GetProgressionPoints();
            for (int i = 0; i < progressionPointArray.Length; i++)
            {
                if (AssetPath != AssetDatabase.GetAssetPath(progressionPointArray[i]))
                {
                    AssetDatabase.AddObjectToAsset(progressionPointArray[i], quest);
                }
            }
            EditorApplication.delayCall += () => AssetDatabase.ImportAsset(AssetPath);
        }
        public void OnQuestRemoveElement(ReorderableList reorderableList)
        {
            Undo.RecordObject(serializedObject.targetObject, "Delete Quest Item");
            if (questEditor != null)
            {
                DestroyImmediate(questEditor);
            }
            QuestManagerAsset st = ((QuestManagerAsset)serializedObject.targetObject);
            QuestAsset        p  = st.GetQuests()[reorderableList.index];

            ProgressionPointAsset[] progressionPoints = p.GetProgressionPoints();
            for (int i = 0; i < progressionPoints.Length; i++)
            {
                DestroyAsset(progressionPoints[i]);
            }
            reorderableList.serializedProperty.DeleteArrayElementAtIndex(reorderableList.index);
            reorderableList.serializedProperty.MoveArrayElement(reorderableList.index, reorderableList.count - 1);
            reorderableList.serializedProperty.arraySize--;
            if (p != null)
            {
                DestroyAsset(p);
            }
        }