CDI Injector View on Asset Store (opens in new tab)

Package details

Latest version
1.0.0
Last updated
First released
Unity version
6000.5.4 or later
Package size
25 KB
Files
23
Views in the past week
7

Price tracking

Last checked
Tracked since
Lowest recorded
$4.99 on

Keywords

CDI Injector

by Iago Oliveira (opens in new tab)

No ratings yet

A zero-setup, dependency-graph-aware dependency injection framework for Unity

Price $4.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for CDI Injector, 6 months Current $4.99; lowest $4.99; highest $4.99 in this period. $0 $2.5 $5 21 Sep 5 Oct 19 Oct 2 Nov

Asset preview

1 / 3

CDI Injector screenshot 1

CDI Injector screenshot 1

About this asset

A zero-setup, dependency-graph-aware dependency injection framework for Unity MonoBehaviours. Inspired by CDI/Spring-style bean lifecycles, adapted for Unity's component model — and fully self-wiring, with no container prefab or scene setup of any kind.

From the publisher's Asset Store listing.

Technical details

  • Zero setup, automagic wiring — any DiMonoBehaviour present in a loaded scene is automatically discovered and booted on startup. No container prefab to add, no parenting requirement, nothing to drag into a scene.
  • [Inject] field injection — declare dependencies as fields, no manual wiring. Works across inheritance: fields declared on a base service class are found too.
  • Interface binding — [Inject] private IFoo _foo; resolves automatically to whichever DiMonoBehaviour implements IFoo. No manual Bind<IFoo, Foo>() setup.
  • ServiceLocator — a static registry for locating any active service by class or interface from anywhere (UI scripts, plain MonoBehaviours, editor tooling), for the cases where [Inject] isn't convenient.
  • Automatic topological boot order — services are initialized only after their dependencies are fully Ready.
  • Async initialization — OnInitialize() returns a Task<bool>, so services can await asset loads, network calls, saves, etc. before reporting readiness.
  • Circular dependency detection — misconfigured graphs fail fast with a clear exception instead of silently deadlocking.
  • Immediate cleanup — destroying a service GameObject unregisters it right away instead of leaving a stale reference until the next scene unload.
  • Build-safe — ships a link.xml for its own assembly, plus an Editor build step that auto-generates a link.xml preserving your project's own DiMonoBehaviour services from IL2CPP/Mono managed code stripping (see AOT/IL2CPP safety).
  • Zero external dependencies — pure C#/UnityEngine, no third-party packages required.

Compatibility

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

As listed on the Asset Store.