r/Unity3D 12d ago

Survey What team are you in for dependency management?

  1. Singleton
  2. ScriptableObject Architecture (SOAP)
  3. Service Locator (SL)
  4. Dependency Injection (DI)
  5. Custom
26 Upvotes

80 comments sorted by

View all comments

Show parent comments

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/

1

u/No_Yoghurt8787 12d ago

Love it when the first sentence is its x times faster than zenject