Sample code from my latest project: 'Ratbag'. This repo is intended to give an idea of how I currently like to program through Unity using C#. I have provided examples of patterns that I have found particularly useful, including: A finite state machine, lots of observer/subscribers, a service locator to avoid global state, adaptors to sit on top of unity components, a humble object used for unit testing, and some static utility methods that aid with dependancy injection.
These patterns have been invaluable in helping me follow the SOLID principles, and I am always looking to extend my repertoire in the aims of creating code bases that are legible, maintainable, and extendable.
Disclaimer:
The namespaces in these scripts do not match the architecture that is shown here. My projects include assets that are contributed by other people, and therefore I don't think it's fair to make their repositories public. As such, This repo is not intended to be representitive of any overall architecture set up, and instead, it is just a collection of samples organised by pattern/functionality for ease of browsing, which might make the namespaces a bit confusing.