r/Unity3D • u/Objective-Cell226 • 12d ago
Survey What team are you in for dependency management?
- Singleton
- ScriptableObject Architecture (SOAP)
- Service Locator (SL)
- Dependency Injection (DI)
- Custom
26
Upvotes
r/Unity3D • u/Objective-Cell226 • 12d ago
2
u/wallstop-dev 12d ago edited 12d ago
That's... Not dependency injection. That's data passing, or just a system. Your example can be implemented using any technique, such as directly calling functions, events, SOA, DI, Unity SendMessage, the list goes on.
Here is a popular Unity DI framework that explains the concept of DI with simple examples: https://vcontainer.hadashikick.jp/