Our great sponsors
-
VContainer
The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I'm not sure Extenject handles this but did you check it? Also if you're forgetting to call the extra init function, you can create a MonoInitializeable interface.
DI libraries in Unity are powerful and very fun to work with when done right, but different types of projects don’t really benefit from them as nearly as much. I primarily use the library VContainer instead of Zenject/Extenject nowadays due to its performance, simplicity, and flexibility. I prefer to have control over my application’s architecture and VContainer is a much better fit for that (plus it’s actually maintained and isn’t plagued with a years long legal dispute).
Related posts
- Unity game architecture Part 1
- I've been a Unity Dev for over 10 years. I recently joined this project that has some seasoned Unity vets but the player object looks like this. I know it mostly comes down to design patterns / choices, but does this seems like an excessive amount of components on one object?
- RigidBody variable names alignment chart
- Dependency Injection Framework
- Methods of object interaction in Unity. How to work with patterns and connections in your code