Custom Unity Tech

I developed a series of tools for personal Unity development in a public git repository here.

Overall, my approach for the tools is to capitalize on Unity’s inspector focused workflow. This means I attempt to bring as much code architecture into scriptable objects as possible. This gives the code a presence inside the Unity inspector while also encouraging modular coding that doesn’t rely on a web of direct references or singleton patterns.

The tools I have found to be most useful are…

  • Global Game Events – An event pattern inside a scriptable object for a more inspector forward work flow. This is based off of Ryan Hipple’s talk here.
  • Factory Pattern – A scriptable object approach to factories. Create scriptable objects with a list of objects and get one randomly by weight.
  • Variable Sets – Store sets of objects in scriptable objects so that multiple scripts can reference them easily without creating a web of references. Useful for things like tracking all active enemies.

The repository also contains a development branch where I experiment with different design patterns.