Beispiel #1
0
        public void OnSelectionChange()
        {
            Selection.pa
            try
            {
                BinaryFormatter fomatter = new BinaryFormatter();
                using (FileStream fs = new FileStream(fullFileName, FileAccess.ReadWrite))
                {

                }
            }
            catch
            {

            }
            _record = Selection.activeObject as FsmRecord;
            if (_record == null && Selection.activeGameObject != null)
            {
                Fsm fsm = Selection.activeGameObject.GetComponent<Fsm>();
                if (fsm != null)
                    _record = fsm.Record;
            }

            CurrentState = null;

            Repaint();
        }
Beispiel #2
0
 void Menu_CreateNewFSM()
 {
     string path = EditorUtility.SaveFilePanelInProject("Save your fsm record", "FsmRecord.asset", "asset", "", "Assets/Resources/Fsm");
     _record = CreateFsmRecord(path);
     EditorGUIUtility.PingObject(_record);
     Selection.activeObject = _record;
     EditorUtility.FocusProjectWindow();
 }