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 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(); } } }