unity-script-roles

Assigns Unity classes to MonoBehaviour, ScriptableObject, or plain C# roles.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-script-roles-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script-roles
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/script-roles
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-script-roles-pcone-mm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When generating a batch of Unity gameplay scripts, AI tools tend to make every class a MonoBehaviour, producing tangled responsibilities and poor architecture. This Skill turns a rough script list into explicit role assignments before any code is written. ## Core Features & Use Cases - Role Assignment: Recommends whether each class should be a MonoBehaviour bridge, ScriptableObject config/data, pure C# domain service, presenter/controller, state machine node, or installer/bootstrap helper. - Structured Output: For each script it reports the recommended role, main responsibility, main dependencies, and why that role fits better than the alternatives. - Use Case: Before implementing a new gameplay feature, list the planned scripts and get a role breakdown so runtime state stays in plain C# objects, configuration lives in ScriptableObjects, and only scene-coupled logic becomes MonoBehaviours. ## Quick Start Ask the assistant to review your planned Unity script list and assign each class a role such as MonoBehaviour, ScriptableObject, or plain C# service with justification.

Frequently Asked Questions about unity-script-roles

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

FAQPage Schema
How do I decide between MonoBehaviour and plain C# in Unity?

Use MonoBehaviour only for classes that need Unity lifecycle callbacks or scene attachment, such as bridges to GameObjects. Domain logic, services, and runtime state should stay in plain C# classes for testability and decoupling.

When should I use ScriptableObject in Unity?

Use ScriptableObject for configuration and shared data assets that persist in the project, such as balancing values or item definitions. Do not use it for transient runtime state, which belongs in memory-only plain C# objects.

How do I split responsibilities across Unity script types?

List your planned scripts, then assign each a single role: MonoBehaviour bridge, ScriptableObject config, pure C# service, presenter/controller, state node, or installer. Document each class's main responsibility and dependencies before writing code.

Why is making every Unity class a MonoBehaviour a problem?

Making everything a MonoBehaviour couples logic to the scene lifecycle, blocks unit testing, and hides dependencies. Separating domain logic into plain C# classes keeps architecture modular and easier to maintain.

Can ScriptableObject store runtime game state?

ScriptableObject is not recommended for runtime-only state because asset instances persist between play sessions in the editor and can leak data. Keep volatile runtime state in plain C# objects instead.