private static void DoCheckFsmForErrors(Skill fsm)
        {
            if (fsm == null || fsm.get_OwnerObject() == null)
            {
                return;
            }
            PlayMakerFSM playMakerFSM = fsm.get_Owner() as PlayMakerFSM;

            if (playMakerFSM != null && playMakerFSM.get_UsesTemplate())
            {
                return;
            }
            try
            {
                fsm.InitData();
                FsmErrorChecker.checkingFsm = fsm;
                FsmErrorChecker.ClearFsmErrors(fsm);
                SkillState[] states = fsm.get_States();
                for (int i = 0; i < states.Length; i++)
                {
                    SkillState fsmState = states[i];
                    fsmState.set_Fsm(fsm);
                    FsmErrorChecker.fsmEventTargetContextGlobal = null;
                    SkillStateAction[] actions = fsmState.get_Actions();
                    for (int j = 0; j < actions.Length; j++)
                    {
                        SkillStateAction fsmStateAction = actions[j];
                        if (fsmStateAction.get_Enabled())
                        {
                            FsmErrorChecker.CheckActionForErrors(fsmState, fsmStateAction);
                        }
                    }
                    FsmErrorChecker.CheckTransitionsForErrors(fsmState);
                }
                FsmErrorChecker.CheckActionReportForErrors();
            }
            catch (Exception ex)
            {
                Debug.LogError(ex.ToString());
                throw;
            }
            SkillEditor.RepaintAll();
        }