- Home /
A finite state machine for game objects
I was about to sit down and do it, but I'd like to know whether it makes sense to sit down and write a FSM from scratch, but one that fully utilizes Unity's strengths, for instance the drag & drop /declarative building of components. The way I see it, every state will extend MonoBehavior, to which one would be able to attach a set of other behaviors and tweak their properties using the Unity IDE, Separately, another behavior, the so called state machine will be responsible for switching between the states whenever needed.
I think you could do that, yes- I've done something similar, using a $$anonymous$$onoBehaviour to control all the interfacing with Unity's gameworld, and then putting the [System.Serializable] attribute at the top of all my member object classes so that I could use the drag-n-drop and other useful inspector features.
Theres a couple FS$$anonymous$$'s on the asset store. Playmaker seems to be the most popular
Your answer
Follow this Question
Related Questions
State-Machine Based Door entity 0 Answers
Multiple animators use the same controller / sate-machine or how to sync them? 2 Answers
Using Playmaker for a game-scope FSM 0 Answers
really weird problem, Enum refusing to change state. 1 Answer
easiest way to implement finite state machine in javascript? 2 Answers