vcontainer

Community

Lightweight DI for Unity with LifetimeScopes

AuthorXeldarAlz
Version1.0.0
Installs0

System Documentation

What problem does it solve?

VContainer provides a lightweight dependency injection framework for Unity, enabling clean wiring of services, lifetime management, and decoupled components to improve testability and maintainability.

Core Features & Use Cases

  • Plain C# constructor injection for non-MonoBehaviour classes and scriptable objects
  • MonoBehaviour integration via [Inject] methods and component registrations
  • LifetimeScope hierarchy with singleton, scoped, and transient lifetimes across scenes
  • Factory and registration patterns to compose complex object graphs without service locators
  • Real-world use: structuring game systems (audio, UI, gameplay) behind interfaces to simplify testing and iteration

Quick Start

Instantiate and wire Unity objects with VContainer to automatically resolve dependencies and manage lifetimes across scenes.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: vcontainer
Download link: https://github.com/XeldarAlz/KlondikeSolitaire/archive/main.zip#vcontainer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.