I don’t know. I hang out on a lot of programming forums, many enterprise oriented (as most of my programming history is enterprise). And DI is just as controversial a topic.
I wouldn’t agree with this either. For example, both Kiwasi and I aren’t Anti-DI, nor are we Pro-DI (correct me if I’m wrong Kiwasi, don’t mean to presume, but that’s the gauge I’ve read).
I more or less see myself, to continue the political analogy, a moderate. I’ll criticize a conservative for going full moron, but when the liberal cheers at my back, I turn around say “now wait a second, you’re not that bright either ya know.”
I will say in a setting of unity, I personally find the component based approach fitting for most dependency injection. I obey the interface/contract rules that DI often totes around, because yes, that works very well. I don’t depend on (have a field for) a “MobTypeAWalkingAnimatorController”, I have a IWalkingAnimatorController that all walking animation controllers implement. And then attach the necessary one to my GameObject.
The one thing I find immensely useful from DI frameworks is the way it approaches singletons/global services. And this most heavily noticeable, just like Kiwasi pointed out in another thread, that most DI frameworks used in Unity boil down to some sort of Service Locator.
But injector (factory) part of the DI pattern… I don’t create a lot of that in code. Not all team mates write code (well), nor understand those concepts. They do understand GameObjects with components (which is arguably a form of dependency injection). I don’t find heavy need for it in game design… aside from the service locator.
Procedural generation stuff maybe could benefit for it… but not everyone does procedural generation.
I don’t know… DI is just such an enterprisey need to me. The ease of changing dependency on the fly to meet a clients needs. A product that is ever evolving as time moves forward, and is maintained primarily by engineers and their lackies.
Games are so much more collaborative in those who work on it, from artist to coder, I find it so much overkill. Like you brought a 150 foot crane to help install a family pool in the back yard. Sure… you COULD use it… but why?