- Home /
Question by
Ephenodrom · Jan 30, 2018 at 08:18 AM ·
aiscriptingbasicsstatestate machinefsm
Bestpractices for statemachines
Hello
I have serveral FSM in my project and they are all build the same way :
One class
Enum for the states declared within the class
Update method contains switch statement for the enum
It works quite good but makes the statemachine quite big if i have a large amount of states. I bought a book about AI in unity and they show how to create a statemachine using/missusing the animator controller.
What is the common and best practices way to build a FSM within Unity and why?
Greetings
Comment