unity-dev-principles

Separate Unity game logic from MonoBehaviour using VContainer, UniRx, and UniTask.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/igot-ai/os-twin --skill unity-dev-principles
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unity-dev-principles
Source: https://github.com/igot-ai/os-twin/tree/main/.agents/skills/roles/game-engineer/unity-dev-principles
Command: npx skills add https://github.com/igot-ai/os-twin --skill unity-dev-principles

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Unity projects often suffer from tightly coupled MonoBehaviour logic that is hard to test, reuse, or scale. ThisSkill defines a principled approach to separating pure C# logic from Unity components, enabling safer refactors and easier validation.

Core Features & Use Cases

  • Reactive state with UniRx for ordering and events, improving UI and gameplay responsiveness.
  • Async patterns with UniTask to avoid Task allocations on the main thread.
  • DI with VContainer to wire services and reduce hard dependencies.
  • Pure C# core logic decoupled from MonoBehaviour, increasing testability and portability.
  • Enforced project rules like English-only comments and mandatory code reviews.

Quick Start

Apply the Unity coding principles to a new project by replacing MonoBehaviour-heavy logic with pure C# logic and wiring through VContainer.

Frequently Asked Questions about unity-dev-principles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate Unity game logic from MonoBehaviour for better testability?▼

To separate Unity game logic from MonoBehaviour, extract pure C# core logic into plain C# classes and wire dependencies using VContainer, which increases testability and enables safer refactors.

What is the best way to handle async operations in Unity without Task allocations?▼

Handling async operations in Unity without Task allocations requires using UniTask, which avoids main thread allocations and provides robust async patterns for gameplay and UI integration.

How does UniRx improve Unity UI and gameplay responsiveness?▼

UniRx improves Unity UI and gameplay responsiveness by implementing reactive state for ordering and events, allowing your pure C# logic to react to data streams efficiently.

Can I apply these Unity C# coding practices to an existing project?▼

Yes, you can apply these Unity C# coding practices to existing projects by gradually replacing MonoBehaviour-heavy logic with pure C# logic and wiring it through VContainer.

Why should I use VContainer for dependency injection in Unity?▼

You should use VContainer for dependency injection in Unity to wire services and reduce hard dependencies, which decouples your pure C# core logic from Unity components for easier validation.

What are the limitations of decoupling pure C# logic from MonoBehaviour in Unity?▼

A limitation of decoupling pure C# logic from MonoBehaviour is the architectural overhead of maintaining strict separation, requiring enforced English-only comments and mandatory code reviews to sustain project structure.