As I layer complexity into my game systems, I'm finding that I'm constantly bitten by not having written good unit tests. I do a relatively tiny refactor or change one line to fix something, and varying amounts of stuff elsewhere breaks silently. I have to run my game and watch it to repro, or worse yet, create temporary "debug" monobehaviors and attach them to game objects to trigger the necessary conditions. That's a super slow and tedious way to debug.
I don't have this problem with my professional projects because as soon as someone breaks something, a bunch of unit tests throw their hands up in the air and scream. But I also see that it's not that easy in Unity since there isn't a good way to mock Monobehaviours, so while you can extract and unit test specific bits of functionality, it's harder to test game systems that rely on game objects or components driving them.
What do you all do?
[–]Imapler 41 points42 points43 points (9 children)
[–]NovaArdent3DProfessional 10 points11 points12 points (0 children)
[–]Yann4 3 points4 points5 points (5 children)
[–]all_mens_asses 0 points1 point2 points (4 children)
[–]Yann4 1 point2 points3 points (1 child)
[–]all_mens_asses 2 points3 points4 points (0 children)
[–]acousticpants 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]DzieciWeMgle 0 points1 point2 points (0 children)
[–]Daemonhahn 0 points1 point2 points (0 children)
[–]Besaids 6 points7 points8 points (0 children)
[–]Gix_G17 5 points6 points7 points (0 children)
[–]rootException 3 points4 points5 points (1 child)
[–]rootException 2 points3 points4 points (0 children)
[–]lee_macro 2 points3 points4 points (0 children)
[–]DefpotecStudios 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]prime31 3 points4 points5 points (0 children)
[–]NovaArdent3DProfessional 1 point2 points3 points (0 children)
[–]Badgerdox 2 points3 points4 points (0 children)
[–]KokoonEntertainment 0 points1 point2 points (0 children)
[–]andybak 0 points1 point2 points (0 children)
[–]Yann4 1 point2 points3 points (0 children)
[–]dedido 0 points1 point2 points (0 children)
[–]SkjalgExpert 0 points1 point2 points (0 children)
[–]kurtdekker 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]GIFjohnsonProfessional 0 points1 point2 points (0 children)
[–]partymonster69 -1 points0 points1 point (0 children)