EasyJection (Dependency Injection Framework) View on Asset Store (opens in new tab)

Package details

Latest version
1.0.3
Last updated
First released
Unity version
2021.3.6 or later
Package size
109 KB
Files
101
Favorites
6
Views in the past week
7

Price tracking

Last checked
Tracked since
Lowest recorded
Free on

Keywords

EasyJection (Dependency Injection Framework)

by Max Karepin (opens in new tab)

No ratings yet

퟉� EasyJection is an easy-to-use Dependency Injection (DI) Framework for Unity. The framework implements dependency injection without using any attributes.

Price Free

Get it free on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for EasyJection (Dependency Injection Framework), 6 months Current Free; lowest Free; highest Free in this period. $0 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 1

EasyJection (Dependency Injection Framework) screenshot 1

EasyJection (Dependency Injection Framework) screenshot 1

About this asset

EasyJection implements dependency injection without using any attributes (like [inject] etc). Such an implementation avoids tying your project code to the framework. Write your code without direct dependencies on the framework itself. You will not have to include framework's namespaces everywhere.

  • Since when the attributes (as well as the namespace) are used in your project's class, that class, at least indirectly, begins to know about where it gets its dependency from.

This project is open source: https://github.com/imaxs/EasyJection

Why use it?

Dependency Injection (DI) is an intimidating word for a simple concept you're likely familiar with. Dependency Injection in simple words, is a software design concept that allows a service to be injected in a way that is completely independent of any client consumption. Dependency Injection separates the creation of a client's dependencies from the client's behavior, which allows program designs to be loosely coupled. A DI container, in pair with a good architecture, can ensure SOLID principles and help you write better code.

EasyJection allows you to write much more flexible, reusable and encapsulated code.

Key Features:

  • Injection Mechanisms
    • Standard C# objects (a.k.a. POCO)
    • Constructor injection
    • Method injection
    • Field injection
    • Property injection
    • Parameter injection
    • Inherited from MonoBehaviour
      • Constructor injection (as the Unity documentation says, you shouldn't implement and call constructors for MonoBehaviours. Unity automatically invokes the constructor.)
      • Method injection (through Awake() and Start(), or other custom methods)
      • Field injection
      • Property injection
      • Parameter injection
  • Can inject on non public members.
  • Convention based binding.
  • Conditional binding (eg. by method name, by signature, etc.)
  • Context Aware Injection Support (dependencies can be automatically injected using the components contained in the child and parents)

From the publisher's Asset Store listing.

Technical details

All platforms based on IL2CPP should be supported.

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2021.3.6f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.