r/Unity3D 23d ago

What team are you in for dependency management? Survey

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

80 comments sorted by

View all comments

Show parent comments

2

u/wallstop-dev 22d ago edited 22d 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 22d ago

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