VContainer is a dependency injection library for the Unity game engine.
The tool addresses the need for fast, memory-efficient dependency resolution in Unity projects. It works by registering types in a container and automatically resolving their dependencies through constructor, method, property, and field injection. The library emphasizes performance through zero garbage collection allocation during resolution of pre-instantiated objects and achieves this via careful API design that avoids complex internal abstractions. It supports flexible scoping through nested lifetime scopes that can be created asynchronously, making it suitable for games with dynamic resource loading patterns.
Developers should choose this tool if they are building performance-sensitive Unity games where garbage collection overhead matters. It suits projects that benefit from structured dependency injection without the complexity of overly feature-rich alternatives. The README indicates the tool is significantly faster than Zenject, with benchmarks showing five to ten times faster resolve performance, and demonstrates substantially lower garbage allocation in profiler comparisons.
The project maintains active test coverage with continuous integration. Development includes optional source generator acceleration for further performance gains, a diagnostics window in the Unity editor for inspecting the container state, and integrations with UniTask and experimental ECS support. The tool requires Unity 2018.4 or later and is distributed through both the Unity Package Manager and manual installation methods.