unity-so-prefab-manager
Unity SO-Prefab Manager
This skill enforces a strictly modular "Bridge" pattern between Data and Logic.
Core Workflow: The Bridge Pattern
To ensure that multiple instances of the same unit (e.g., 4 Robots) can have independent runtime values (Health, Energy) while sharing the same Template (RobotSO), follow these steps:
1. Structure the ScriptableObject (The Template)
The SO should contain Static/Read-Only data that defines the "Ideal" version of the object.
- Example:
maxHealth,baseSpeed,displayName.
2. Structure the MonoBehaviour (The Instance)
The script on the Prefab should contain Runtime/Mutable data and a reference to the SO.
- Example:
currentHealth,activeBuffs.
3. Initialize the Bridge
Use Awake() to copy values from the SO to the local instance variables.
More from muharremtozan/unity-agent-skills
unity-fsm
Specialized skill for implementing a robust, extensible Finite State Machine in Unity using the State and Strategy patterns. Based on the pattern by Adam Myhre (3D Platformer). Use when creating complex AI, player controllers, or any system requiring structured state management.
12unity-code-reviewer
Professional Unity C# Code Reviewer. Detects anti-patterns, performance leaks, and enforces project-specific architecture.
11unity-assembly-management
Manage project boundaries using Assembly Definitions (.asmdef) for faster compile times and modular architecture. Based on the patterns by Adam Myhre. Enforces responsibility-based organization and handles Runtime/Editor/Tests splits.
10unity-event-bus
Advanced code-driven event bus with reflection-based bootstrapping. Provides zero-setup global messaging.
10unity-ui-data-binding
Implementation of MVVM-style Data Binding for Unity UI Toolkit using the [CreateProperty] attribute and BindableProperty wrappers.
10unity-observer-pattern
Reactive Property system for Unity. Decouples data from UI and logic using observable wrappers and UnityEvents.
9