Skip to content
Discussion options

You must be logged in to vote

Yes, UniState is a better choice than a MonoBehaviour-based state machine, but if your player FSM is very small and can live in one Update() with a simple switch, that will still be the cheapest option in raw performance.
For something like Idle / Move / Attack, I would keep plain Update() if the logic is small. But if you expect the state machine to grow, I would use UniState, because the overhead stays small while the code becomes much easier to scale and maintain.

If you go with UniState here, I suggest bind states as singletons and disable history on state machine for your case.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yukey123456
Comment options

Answer selected by yukey123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants