You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a fairly large state machine, and it works for most everything I've been doing. However, I'm currently getting an error and am having a VERY hard time tracking down the line of code that is the culprit (again, large state machine). If the error had some more information as to where it originated from, I think it would be way more useful. It would be nice if it referenced the line or name of the state machine, state, or transition that is causing the error.
Here is the error that needs clarity:
StateMachineException:
Context: Running OnEnter of the state machine.
Problem: No start state is selected. The state machine needs at least one state to function properly.
Solution: Make sure that there is at least one state in the state machine before running Init() or OnEnter() by calling fsm.AddState(...).
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].OnEnter () (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:400)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].ChangeState (TStateId name, UnityHFSM.ITransitionListener listener) (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:215)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].OnEnter () (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:386)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].ChangeState (TStateId name, UnityHFSM.ITransitionListener listener) (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:215)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].RequestStateChange (TStateId name, System.Boolean forceInstantly, UnityHFSM.ITransitionListener listener) (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:264)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].TryTransition (UnityHFSM.TransitionBase`1[TStateId] transition) (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:319)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].TryAllDirectTransitions () (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:355)
UnityHFSM.StateMachine`3[TOwnId,TStateId,TEvent].OnLogic () (at Assets/UnityHFSM-v2.1.0/src/StateMachine/StateMachine.cs:414)
Update () (at Assets/Scripts/CharacterController.cs:566)
The text was updated successfully, but these errors were encountered:
I think I found what these were during my troubleshooting.
I am using enums instead of text fields for my states. These errors were for the items that were marked as NONE in the enum. I had associated a state machine with the enum when there weren't any states in the state machine. It would still be nice to have some idea of what is being referenced in the error. This was maddening trying to find what was wrong.
I've got a fairly large state machine, and it works for most everything I've been doing. However, I'm currently getting an error and am having a VERY hard time tracking down the line of code that is the culprit (again, large state machine). If the error had some more information as to where it originated from, I think it would be way more useful. It would be nice if it referenced the line or name of the state machine, state, or transition that is causing the error.
Here is the error that needs clarity:
The text was updated successfully, but these errors were encountered: