/ModeMachineWIP

A simple pushdown state machine for unity3d

Primary LanguageC#Creative Commons Zero v1.0 UniversalCC0-1.0

ModeMachine

this library is currently WIP!

Download DLL Here

Download sample project here (WIP)

Current to-do list:

  • Basic architecture, push & remove modes
  • OnPush, OnRemove, OnStackChanged events
  • Stack querys: GetDepth
    • Channels for filtering modes with GetDepth
  • Custom inspectors for debugging Mode and ModeStack
    • Needs to have functionality for configuring channels
  • Support passing arguments to modes
  • Write literally any documentation
  • Template implementation (examples & templates for extending the system):
    • Dependency injection with modes
    • Transitions

Notes

Now with less features!

This repo currently contains only the (in-progress) source code for the 2020 version of mode machine. Contact me directly if you need access to an older version & I'll see what I can do!

ModeMachine's intended use in unity projects is with a .dll (to leverage the 'internal' keyword for encapsulation). If you want to change the source code, I recommend rebuilding the .dll rather than use the source code directly in Unity. Note that you'll need to change the build path in the .csproj file