Publisher | Mathijs Bakker |
---|---|
File size | 12.00MB |
Number of files | 754 |
Latest version | 9.2.0 |
Latest release date | 2020-05-26 08:35:18 |
First release date | 2019-11-25 11:08:13 |
Supported Unity versions | 2018.4.2 or higher |
A highly performant dependency injection framework built for Unity. A tool to turn the code base of your game into a collection of loosely-coupled parts. So it's maintainable, flexible and testable.
Wait a minute! I hear you say, This sounds familiar! And yes you are right!..
Extenject is the continuation of the Zenject Project!
Why is dependency injection useful?
The vast majority of effort that is invested in software happens after the initial release. Because loosely coupled code makes your software much easier to change, a small up-front time investment will pay huge dividends as time goes on.
How much does it cost?
Extenject is and will always be free for both personal and commercial projects. It's also open source (licensed under MIT license), so you can fork the code.
The package contains:
- Zenject
- Optional Extras:
- Zenject Test Framework
- Extensions for creating test doubles.
- Memory Pool Monitor
- Reflection Baking
- Signals event system
- Two example games (beginner and advanced)
For more details as well a detailed tutorial, see the Github page here
Extenject is tested on the following platforms:
PC, Mac, Linux, iOS, Android, UWP / WSA / WP8 and WebGL.
Note: All IL2CPP based platforms should be supported.
Key Features:
Injects into:
- MonoBehaviours and C# classes;
- Constructors;
- Fields;
- Properties;
- Methods (for methods marked with the [Inject] attribute).
- Conditional binding (eg. by type, by name, by parent type, etc.).
- Optional Dependencies.
- Dynamically creating objects after initialization using factories.
- Built-in support for Memory Pools.
- Global, project-wide dependencies to apply to all scenes.
- Nested DI Containers aka Sub-Containers
- Inject across different Unity scenes.
- Scene parenting, to allow one scene to inherit the dependencies from another.
- Convention based binding, based on class name, namespace, or any other criteria.
- Validate Object Graphs in the editor for quicker iteration.
- Automatic binding on components in the scene using the ZenjectBinding component.
- Just-in-time resolving using the Lazy<> construct.
- Support for decorator pattern.
- Built in support for unit test, integration tests, and scene tests.
- Create test doubles with Extenject's Moq and NSubstitute support (libraries included).
- Support for automatically mapping open generic types.
- Just-in-time injection using the LazyInject<> construct.
- Multiple threads support.
- Reflection Baking to eliminate costly reflection operations completely by directly modifying the generated assemblies.
- Automatic injection of game objects using ZenAutoInjecter component.