Fast, lightweight dependency injection for Unity. Zenject's power without the bloat - contexts, tags, zero-alloc injection, and a built-in dependency graph window.CubeDI is a modern dependency injection (IoC) container for Unity, built to be small, fast and genuinely easy to use.Why CubeDI?Dependency injection shouldn't require a 300-page manual or a heavyweight framework. Zenject is powerful but bloated; VContainer is lean but under-documented. CubeDI hits the sweet spot: a tiny, readable API you can learn in an afternoon, backed by a resolver that stays out of your way at runtime.Built for real projects- One clear entry point: SceneContext per scene, GlobalContext auto-loaded across scenes (no bootstrap scene needed).- Constructor, method, field and property injection - use whichever fits.- Real keyed (tagged) bindings, multi-binding, and nested child containers.- A clean lifecycle: Initialize, Tick / FixedTick / LateTick, and deterministic Dispose.- Prefab instantiation with dependencies injected before Awake.- Zero-allocation injection at runtime - no GC hitches during gameplay.- No hidden global state - safe with disabled Domain Reload and fast Play Mode enter.- IL2CPP / AOT friendly. No code generation required to ship.See it, don't guess itCubeDI ships with a live Dependency Graph window (Window > CubeDI > Dependency Graph): inspect every context and binding, and catch missing dependencies and constructor cycles before they ever throw at runtime. Nothing like it comes built into Zenject or VContainer.Everything is plain C#, fully commented, and shipped with complete source code - no DLLs, no black boxes. Read it, tweak it, own it.Roadmap- Optional source generator for zero-reflection injection on AOT platforms.SupportQuestions, bugs or feature requests? Reach out at alex.max5568@gmail.com or on Discord grandmax1 - fast replies.- Injection styles: constructor, method, field and property injection- Lifetimes: Singleton and Transient, plus nested child containers for scoped services- Contexts: per-scene SceneContext and auto-loaded cross-scene GlobalContext- Keyed / tagged bindings - multiple implementations of one interface- Multi-binding: inject IEnumerable or resolve all implementations at once- Lifecycle: IInitializable, ITickable, IFixedTickable, ILateTickable, IDisposable- Correct player-loop timing via a single lightweight runner (no per-scene handler objects)- Prefab instantiation with dependencies ready before Awake- Circular-dependency detection with a readable resolution path- Built-in Dependency Graph editor window (list + graph views, missing/cycle highlighting)- Zero-allocation field/method injection; cached reflection, no LINQ on the hot path- Safe with disabled Domain Reload and Enter Play Mode options- IL2CPP / AOT compatible, no runtime code emission- Isolated assembly definitions and a single clean namespace- Full C# source, XML docs and runnable samples included- Parameterized runtime factories - inject Func to spawn enemies/bullets with per-instance data + full DI- Fail-fast startup validation - missing bindings and cycles caught at scene load, not mid-session- Crash-resistant lifecycle - one throwing system can't starve the rest- Deterministic execution-order priority across Initialize and all tick phases- Rich resolution errors with the full dependency chain and owning context- Unity 2021.2 and newer

