Extenject is simply a continuation of the Zenject project by the primary author
It is a lightweight highly performant dependency injection framework built specifically to target Unity. It can be used to turn the code base of your Unity application into a collection of loosely-coupled parts with highly segmented responsibilities. It can then glue the parts together in many different configurations to allow you to easily write, re-use, refactor and test your code in a scalable and extremely flexible way.
For more details as well as a detailed tutorial, see the github page here
Tested on the following platforms:
PC, Mac, Linux, iOS, Android, UWP / WSA / WP8 and WebGL. Note that All IL2CPP based platforms should be supported
Key Features:
- Injection into both C# classes or MonoBehaviours
- Constructor injection
- Field injection
- Property injection
- Method injection (for methods marked with [Inject] attribute)
- Conditional binding (eg. by type, by name, by parent type, etc.)
- Optional Dependencies
- Support for creating objects after initialization using factories
- Built-in support for memory pools
- Support for global, project-wide dependencies to apply to all scenes
- Nested Containers aka Sub-Containers (allowing to create discrete 'islands' of dependencies using 'Facade' classes)
- Injection across different Unity scenes to pass information from one scene to the next
- Scene parenting, to allow one scene to inherit the dependencies from another
- Convention based binding, based on class name, namespace, or any other criteria
- Ability to validate object graphs at editor time for quicker iteration (including dynamic object graphs created via factories)
- Automatic binding on components in the scene using the `ZenjectBinding` component
- Just-in-time resolving using the Lazy<> construct
- Auto-Mocking using the Moq library
- Support for decorator pattern using decorator bindings
- Built in support for unit test, integration tests, and scene tests
- Support for automatically mapping open generic types
- Just-in-time injection using the LazyInject<> construct
- Support for multiple threads for resolving/instantiating
- Support for 'reflection baking' to eliminate costly reflection operations completely by directly modifying the generated assemblies
- Automatic injection of game objects using ZenAutoInjecter component