Exemplo n.º 1
0
        private void OnBtn(PresetData presetData)
        {
            if (presetData != null)
            {
                Undo.RecordObject(selectedEasyflow.saveData, "NAsoft_EasyFlow_Undo_Point");

                presetData.LoadToSaveData(ref selectedEasyflow.saveData);
                selectedEasyflow.Init();
                selectedEasyflow.Init();
                selectedEasyflow.InitTexture();
                EditorUtility.SetDirty(selectedEasyflow);
                EditorUtility.SetDirty(selectedEasyflow.saveData);
            }
        }
Exemplo n.º 2
0
 private void CheckUndoRedoEvent()
 {
     if (Event.current.type == EventType.ValidateCommand)
     {
         if (Event.current.commandName.CompareTo("UndoRedoPerformed") == 0)
         {
             if (selectedEasyflow != null)
             {
                 selectedEasyflow.Init();
                 selectedEasyflow.InitTexture();
             }
         }
     }
 }