MuharremTozan/Agentic-Duel / .agent/skills/unity-so-prefab-manager
unity-so-prefab-manager
VerifiedManages the structured relationship between ScriptableObjects (Data) and Prefabs (Logic/Visuals) in Unity 6. Follows the 'SO-to-Mono' Bridge pattern to ensure instance independence (e.g., individual health for identical robots) while maintaining a clean, data-driven architecture. Use when: (1) Creating new unit/item types, (2) Wiring SO data to Prefab MonoBehaviours, (3) Resolving data-sharing bugs where changing one SO affects all instances.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.0 KB |
| assets/code/DataEntity.cs.txt | markdown | 676 B |
| references/bridge-pattern.md | markdown | 1.5 KB |
| references/naming-conventions.md | markdown | 1.2 KB |
| references/yaml-templates.md | markdown | 1.1 KB |
assets/code/DataEntity.cs.txt
View on GitHubusing UnityEngine;
namespace Standard.Core {
/// <summary>
/// Base class for any MonoBehaviour that relies on a ScriptableObject for its data.
/// Provides a standardized way to link Data (SO) to Logic (Mono).
/// </summary>
public abstract class DataEntity<T> : MonoBehaviour where T : ScriptableObject {
[Header("Data Bridge")]
[SerializeField] protected T data;
public T GetData() => data;
protected virtual void Awake() {
if (data == null) {
Debug.LogError($"[{GetType().Name}] Status: Fail | Message: Missing ScriptableObject data on {gameObject.name}");
}
}
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |