How emre-emiroglu/hmmodelviewcontroller works
Project type and purpose
• This is a Unity-compatible UPM package providing a generic Model-View-Controller framework, augmented with a Mediator layer, to help Unity developers cleanly separate data, UI, and logic. It ships as a standalone library (see package.json, asmdef files) and comes with EditMode and PlayMode tests.
File structure
Top level
• package.json / README.md / LICENSE.md / CHANGELOG.md → defines the UPM package metadata
• Runtime/CodeCatGames.HMModelViewController.Runtime.asmdef → Unity assembly definition for runtime code
• Tests/EditMode/*.asmdef and Tests/PlayMode/*.asmdef → assemblies for unit and play mode tests
Runtime folder
• Interfaces: IModel<TSettings>, IView, IMediator<TModel,TSettings,TView>, IController<TModel,TSettings,TView>
• Base classes: Model<TSettings>, View, Mediator<TModel,TSettings,TView>, Controller<TModel,TSettings,TView>
• Concrete wiring (Controller.cs, Mediator.cs, Model.cs, View.cs) implement the generic contracts
Tests folder
• EditMode tests verify model/view/controller behavior in the editor
• PlayMode tests verify runtime interactions
Key insights from the README
• Core patterns: MVC + Mediator
• Extensibility via generic interfaces
• Usage: developers subclass Model, View, Mediator, Controller to implement application-specific logic
Elements
• Interfaces (e.g., light blue rectangles)