unity-mvc-pattern

Implement Unity UI architecture with MVC/MVP patterns separating Model, View, and Presenter.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-mvc-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-mvc-pattern
Source: https://github.com/MuharremTozan/Ohm-Yura/tree/main/.agents/skills/unity-mvc-pattern
Command: npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-mvc-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Unity projects often struggle with maintaining clean UI code as projects scale. This skill provides a structured MVC/MVP approach to separate data, visuals, and logic to improve testability and maintainability.

Core Features & Use Cases

  • Separation of concerns between Model, View, and Presenter to decouple data from visuals.
  • Reactive UI updates via ObservableList to keep UI in sync with data changes.
  • Practical patterns for common UI systems in Unity (inventory, HUDs, settings).

Quick Start

Instantiate the pattern by wiring a Model, a Passive View, and a Presenter within a Unity scene and observe the UI updates automatically.

Frequently Asked Questions about unity-mvc-pattern

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

FAQPage Schema
How do I separate Unity UI logic from visuals to improve maintainability?

To separate Unity UI logic from visuals, implement an MVC/MVP pattern that decouples data into a Model, visuals into a Passive View, and logic into a Presenter. This structure enforces separation of concerns to keep UI code testable as projects scale.

How do I build a reactive Unity UI that updates automatically when data changes?

You build a reactive Unity UI by wiring an ObservableList within your Presenter to notify the Passive View of data changes. This reactive approach keeps UI elements in sync with the Model automatically without manual refresh calls.

What is the best way to structure complex Unity UI systems like inventories and HUDs?

The best way to structure complex Unity UI systems like inventories and HUDs is applying an MVC/MVP architecture. This pattern separates data, views, and logic, ensuring that complex UI layers remain maintainable and easy to test.

Does the MVC pattern work for managing Unity settings menus?

Yes, the MVC pattern works effectively for managing Unity settings menus by separating settings data from the visual menu. Using a Presenter to handle logic ensures the settings UI remains decoupled and automatically synced through ObservableList notifications.

How do I set up an MVP architecture in a Unity scene?

To set up an MVP architecture in a Unity scene, instantiate the pattern by wiring a Model, a Passive View, and a Presenter together. Once connected, the View will observe data changes and update the UI automatically.