Zenject is a lightweight highly performant dependency injection framework built specifically to target Unity 3D (however it can be used outside of Unity as well). It can be used to turn your application into a collection of loosely-coupled parts with highly segmented responsibilities. Zenject can then glue the parts together in many different configurations to allow you to easily write, reuse, refactor, and test your code in a scalable and extremely flexible way. Injection across different Unity scenes to pass information from one scene to the next. Scene parenting, allows one scene to inherit the bindings from another. Support for global, project-wide bindings to add dependencies for all scenes. Convention based binding, based on class name, namespace, or any other criteria. Ability to validate object graphs at editor time (including dynamic object graphs created via factories). Automatic binding on components in the scene using the ZenjectBinding component.
Features
- IL2CPP is supported, however there are some gotchas
- This project is open source
- Supports both normal C# classes and MonoBehaviours
- Conditional binding (eg. by type, by name, etc.)
- Optional dependencies
- Support for creating objects after initialization using factories