public void StartUpFsmController() { if (TopStateMachine == null) { Debug.LogError("FSMController Cant Start ,TopStateMachine is Null"); return; } if (TopStateMachine.DefaultState == null) { Debug.LogError("FSMController Cant Start ,TopStateMachine DefaultState is Null"); return; } CurStateMachine = TopStateMachine; CurState = TopStateMachine.DefaultState; TopStateMachine.OnEnterStateMachine(); }