Creating a Simple State Machine in Unity

Опубликовано: 26 Октябрь 2024
на канале: Hunter Dyar
105
4

Spending a calm Thursday morning implementing a state machine, and decided to record the process for this video. State machines are an extremely helpful game programming pattern.


Particularly, using ScriptableObjects to manage the states is useful. In the future I'll probably make a new version of this video where I make the more sophisticated and complex code choices (that I allude to here), and where its on its own, and not part of an existing project.


For now, I like that it's in an existing project, so student's can see some of the ugliness that comes from finding the line between elegant code architecture and more pragmatic get-it-done decision making.