A minimal code-based C# FSM that I use in Unity. There's an accompanying blog post here.
A Minimal FSM in C# that I use in Unity