The unique thing about Unity is all the hard references you make in the scene with the dragging and dropping of components. It makes everything so tightly coupled it scares me. I was hoping there was some good, proven, design patterns out there to help decouple those things.
Hopefully, as we move forward past everything that has a strong UI element it will be easier to get back into proper coding habits.
And don't get me stared on the illegible file format that scenes get saved as, making me feel like I'm hacking the matrix whenever there is a git conflict.
toggle quoted message
Show quoted text
?
I've only done a small amount of Unity and didn't do any TDD there (I know, my bad), but I would take the same approach I would if it was a Swing or Android app - move as much code as possible to be agnostic of the infrastructure it is running in and test that in isolation.
I would have a series of ports, a la ports/adapters, that allow the domain logic to communicate to/from the Unity layer and have the domain logic only be aware of those, then provide adapters into Unity.? The biggest downside I see from this is that it will undoubtedly bloat your code and could _potentially_ have a performance impact depending on the type of game you're making.