private void OnDisable()
        {
            string text = (this.selectedAction != null) ? this.selectedAction.get_FullName() : "";

            EditorPrefs.SetString("PlayMaker.ActionSelector.SelectedAction", text);
            EditorPrefs.SetString("PlayMaker.ActionSelector.SelectedActionCategory", this.selectedActionCategory);
            ActionSelector.instance = null;
        }
 private void AddSelectedActionAfter()
 {
     if (this.selectedAction == null || SkillEditor.SelectedState == null)
     {
         return;
     }
     SkillEditor.StateInspector.AddActionAfterSelectedAction(this.selectedAction);
     ActionSelector.FinishAddAction();
 }
        public static SkillStateAction InsertAction(SkillState state, Type actionType, SkillStateAction beforeAction)
        {
            SkillEditor.RegisterUndo(Strings.get_Command_Add_Action());
            SkillStateAction result = SkillEditor.Builder.InsertAction(SkillEditor.SelectedState, actionType, beforeAction);

            ActionSelector.AddActionToRecent(actionType);
            SkillEditor.UpdateActionUsage();
            return(result);
        }
 public override void Initialize()
 {
     ActionSelector.instance = this;
     base.set_minSize(new Vector2(200f, 200f));
     base.set_wantsMouseMove(true);
     this.isToolWindow = true;
     this.InitWindowTitle();
     this.InitSearchBox();
     Actions.BuildList();
     this.FilterActionList();
     this.NeedToFindAction();
     this.RestoreSelectedAction();
     base.Repaint();
 }
 public static void FinishAddAction()
 {
     if (ActionSelector.instance == null)
     {
         return;
     }
     ActionSelector.AddActionToRecent(ActionSelector.instance.selectedAction);
     if (FsmEditorSettings.CloseActionBrowserOnEnter)
     {
         ActionSelector.instance.Close();
         if (Event.get_current() != null)
         {
             GUIUtility.ExitGUI();
         }
     }
 }
 private static void SetRecentSize(object userdata)
 {
     FsmEditorSettings.ActionBrowserRecentSize = (int)userdata;
     FsmEditorSettings.SaveSettings();
     ActionSelector.EnforceRecentCategorySize();
 }
 public static void AddActionToRecent(Type actionType)
 {
     Actions.InsertActionAtTopOfCategory("Recent", actionType);
     ActionSelector.EnforceRecentCategorySize();
     ActionSelector.RefreshFilteredList();
 }
 public static void RemoveFromFavorites(object actionType)
 {
     Actions.RemoveActionFromCategory("Favorites", actionType as Type);
     ActionSelector.RefreshFilteredList();
 }
 public static void AddToFavorites(object actionType)
 {
     Actions.AddActionToCategory("Favorites", actionType as Type, -1);
     ActionSelector.RefreshFilteredList();
 }