When taking over a live Unity game that has been running in production for several years, a familiar scenario unfolds: almost every script you open contains calls like GameManager.Instance , SoundManager.Instance , or DataManager.Instance .
These global Singletons are scattered across hundreds of files. As features pile up, tweaking a single line of code in one system can silently break unrelated functionality elsewhere, triggering regression bugs.
Eventually, the engineering team agrees that automated unit testing must be integrated into the CI/CD pipeline to safeguard critical gameplay calculations. But the moment we start writing tests, a roadblock appears: core business logic is tightly coupled to GameManager.Instance (which inherits from MonoBehaviour ).…