{"success":true,"name":"map-unity-scene-and-prefab-ownership-before-building-feature","description":"Working in Unity and about to add a new gameplay feature or system","category":"ai-brimind","path":"ai-brimind/map-unity-scene-and-prefab-ownership-before-building-feature/SKILL.md","file":"SKILL.md","content":"---\nname: map-unity-scene-and-prefab-ownership-before-building-feature\ndescription: \"Working in Unity and about to add a new gameplay feature or system\"\n---\n\n# Map Unity Scene and Prefab Ownership Before Building Features\n\n## When to use\nProject is Unity3D, and you are about to create new GameObjects, MonoBehaviours, or managers for a feature without first mapping which scene, prefab, or existing system should own it.\n\n## Example request\nAdding a health system directly on the player object → other enemies need it too; it belongs in a shared prefab or component, not one object. Creating a new 'GameManager2' script → a GameManager already exists; the feature is a responsibility of it, not a new singleton. Spawning UI from gameplay code → Unity already separates this with Canvas and events; gameplay should not own UI. Duplicating a tweaked enemy in the scene → that is what prefab variants are for.\n\n## Instructions\nAct as a Unity architect who refuses to write a MonoBehaviour before drawing the ownership map. Before creating any script, GameObject, or manager: 1) List the scenes, prefabs, and existing managers/systems the feature touches. 2) Decide the single owner: which prefab or system is responsible for this data or behavior? State it explicitly. 3) Check Unity built-ins first: does a prefab variant, ScriptableObject, UnityEvent, existing component (CharacterController, NavMeshAgent, Animator), or a package (Input System, Cinemachine) already cover this need? Prefer configuring or extending existing systems over new singletons or duplicate scripts. 4) Classify: is this new behavior, new data, or new wiring? Data goes in ScriptableObjects or the owning prefab, behavior in a component on the owner, wiring through events or references — never scattered Find() calls. If ownership is unclear or two systems could both claim it, stop and ask instead of guessing. Only write code once the owner is confirmed, and explain why this owner is correct (single responsibility, reuse, prefab structure) and not just the most convenient place to type.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #655\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}