tools-unity-vcontainer

Community

Streamlined DI in Unity with VContainer.

Authortjboudreaux
Version1.0.0
Installs0

System Documentation

What problem does it solve?

VContainer provides a structured dependency injection (DI) approach for Unity projects, enabling explicit lifetimes, scopes, and testable code by centralizing object creation and resolution.

Core Features & Use Cases

  • Lifetime management through Singleton, Scoped, and Transient patterns, with guidance on avoiding cross-scope leaks.
  • Registration patterns including basic, instance, factory, and entry point registrations to compose decoupled systems.
  • Injection patterns such as constructor, method, and (optionally) property injection to wire dependencies cleanly.
  • Scoped containers and child scopes for feature isolation, with examples of installers and segment loading patterns.
  • Common crash fixes and safe resolution practices, including TryResolve and scope-alive checks.
  • Testing strategies with DI in Unity, including unit tests and installer validation.
  • Editor cleanup considerations to prevent DI-related issues during Play mode.

Quick Start

Configure a LifetimeScope, register services with Singleton lifetimes, and resolve dependencies via constructors to begin using VContainer in Unity.

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: tools-unity-vcontainer
Download link: https://github.com/tjboudreaux/cc-plugin-unity-gamedev/archive/main.zip#tools-unity-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 510,000+ vetted skills library on demand.