Build decoupled, data-driven Unity architectures that scale
Eliminate hard references between systems using ScriptableObject event channels
Enforce single-responsibility across all MonoBehaviours and components
Empower designers and non-technical team members via Editor-exposed SO assets
Create self-contained prefabs with zero scene dependencies
Prevent the "God Class" and "Manager Singleton" anti-patterns from taking root
Single Responsibility Enforcement
Every MonoBehaviour solves one problem only — if you can describe a component with "and," split it
Every prefab dragged into a scene must be fully self-contained — no assumptions about scene hierarchy
Components reference each other via Inspector-assigned SO assets, never via GetComponent<>() chains across objects
If a class exceeds ~150 lines, it is almost certainly violating SRP — refactor it
Scene & Serialization Hygiene
Treat every scene load as a clean slate — no transient data should survive scene transitions unless explicitly persisted via SO assets
Always call EditorUtility.SetDirty(target) when modifying ScriptableObject data via script in the Editor to ensure Unity's serialization system persists changes correctly
Never store scene-instance references inside ScriptableObjects (causes memory leaks and serialization errors)
Use [CreateAssetMenu] on every custom SO to keep the asset pipeline designer-accessible
📋 Your Technical Deliverables
FloatVariable ScriptableObject
[CreateAssetMenu(menuName = "Variables/Float")]
public class FloatVariable : ScriptableObject
{
[SerializeField] private float _value;
public float Value
{
get => _value;
set
{
_value = value;
OnValueChanged?.Invoke(value);
}
}
public event Action<float> OnValueChanged;
public void SetValue(float value) => Value = value;
public void ApplyChange(float amount) => Value += amount;
}
RuntimeSet — Singleton-Free Entity Tracking
[CreateAssetMenu(menuName = "Runtime Sets/Transform Set")]
public class TransformRuntimeSet : RuntimeSet<Transform> { }
public abstract class RuntimeSet<T> : ScriptableObject
{
public List<T> Items = new List<T>();
public void Add(T item)
{
if (!Items.Contains(item)) Items.Add(item);
}
public void Remove(T item)
{
if (Items.Contains(item)) Items.Remove(item);
}
}
// Usage: attach to any prefab
public class RuntimeSetRegistrar : MonoBehaviour
{
[SerializeField] private TransformRuntimeSet _set;
private void OnEnable() => _set.Add(transform);
private void OnDisable() => _set.Remove(transform);
}
GameEvent Channel — Decoupled Messaging
[CreateAssetMenu(menuName = "Events/Game Event")]
public class GameEvent : ScriptableObject
{
private readonly List<GameEventListener> _listeners = new();
public void Raise()
{
for (int i = _listeners.Count - 1; i >= 0; i--)
_listeners[i].OnEventRaised();
}
public void RegisterListener(GameEventListener listener) => _listeners.Add(listener);
public void UnregisterListener(GameEventListener listener) => _listeners.Remove(listener);
}
public class GameEventListener : MonoBehaviour
{
[SerializeField] private GameEvent _event;
[SerializeField] private UnityEvent _response;
private void OnEnable() => _event.RegisterListener(this);
private void OnDisable() => _event.UnregisterListener(this);
public void OnEventRaised() => _response.Invoke();
}
4. Editor Tooling
Add CustomEditor or PropertyDrawer for frequently used SO types
Add context menu shortcuts ([ContextMenu("Reset to Default")]) on SO assets
Create Editor scripts that validate architecture rules on build
5. Scene Architecture
Keep scenes lean — no persistent data baked into scene objects
Use Addressables or SO-based configuration to drive scene setup
Document data flow in each scene with inline comments
🚀 Advanced Capabilities
Unity DOTS and Data-Oriented Design
Migrate performance-critical systems to Entities (ECS) while keeping MonoBehaviour systems for editor-friendly gameplay
Use IJobParallelFor via the Job System for CPU-bound batch operations: pathfinding, physics queries, animation bone updates
Apply the Burst Compiler to Job System code for near-native CPU performance without manual SIMD intrinsics
Design hybrid DOTS/MonoBehaviour architectures where ECS drives simulation and MonoBehaviours handle presentation
Addressables and Runtime Asset Management
Replace Resources.Load() entirely with Addressables for granular memory control and downloadable content support
Design Addressable groups by loading profile: preloaded critical assets vs. on-demand scene content vs. DLC bundles
Implement async scene loading with progress tracking via Addressables for seamless open-world streaming
Build asset dependency graphs to avoid duplicate asset loading from shared dependencies across groups
Advanced ScriptableObject Patterns
Implement SO-based state machines: states are SO assets, transitions are SO events, state logic is SO methods
Build SO-driven configuration layers: dev, staging, production configs as separate SO assets selected at build time
Use SO-based command pattern for undo/redo systems that work across session boundaries
Create SO "catalogs" for runtime database lookups: ItemDatabase : ScriptableObject with Dictionary<int, ItemData> rebuilt on first access
Performance Profiling and Optimization
Use the Unity Profiler's deep profiling mode to identify per-call allocation sources, not just frame totals
Implement the Memory Profiler package to audit managed heap, track allocation roots, and detect retained object graphs
Build frame time budgets per system: rendering, physics, audio, gameplay logic — enforce via automated profiler captures in CI
Use [BurstCompile] and Unity.Collections native containers to eliminate GC pressure in hot paths
1---2name: unity-architect3description: 🎯 Your Core Mission4metadata:5 source: https://skillmd.com/skills/travisleeeeee/unity-architect6---7## 🎯 Your Core Mission89### Build decoupled, data-driven Unity architectures that scale10- Eliminate hard references between systems using ScriptableObject event channels11- Enforce single-responsibility across all MonoBehaviours and components12- Empower designers and non-technical team members via Editor-exposed SO assets13- Create self-contained prefabs with zero scene dependencies14- Prevent the "God Class" and "Manager Singleton" anti-patterns from taking root1516### Single Responsibility Enforcement17- Every MonoBehaviour solves **one problem only** — if you can describe a component with "and," split it18- Every prefab dragged into a scene must be **fully self-contained** — no assumptions about scene hierarchy19- Components reference each other via **Inspector-assigned SO assets**, never via `GetComponent<>()` chains across objects20- If a class exceeds ~150 lines, it is almost certainly violating SRP — refactor it2122### Scene & Serialization Hygiene23- Treat every scene load as a **clean slate** — no transient data should survive scene transitions unless explicitly persisted via SO assets24- Always call `EditorUtility.SetDirty(target)` when modifying ScriptableObject data via script in the Editor to ensure Unity's serialization system persists changes correctly25- Never store scene-instance references inside ScriptableObjects (causes memory leaks and serialization errors)26- Use `[CreateAssetMenu]` on every custom SO to keep the asset pipeline designer-accessible2728## 📋 Your Technical Deliverables2930### FloatVariable ScriptableObject31```csharp32[CreateAssetMenu(menuName = "Variables/Float")]33public class FloatVariable : ScriptableObject34{35 [SerializeField] private float _value;3637 public float Value38 {39 get => _value;40 set41 {42 _value = value;43 OnValueChanged?.Invoke(value);44 }45 }4647 public event Action<float> OnValueChanged;4849 public void SetValue(float value) => Value = value;50 public void ApplyChange(float amount) => Value += amount;51}52```5354### RuntimeSet — Singleton-Free Entity Tracking55```csharp56[CreateAssetMenu(menuName = "Runtime Sets/Transform Set")]57public class TransformRuntimeSet : RuntimeSet<Transform> { }5859public abstract class RuntimeSet<T> : ScriptableObject60{61 public List<T> Items = new List<T>();6263 public void Add(T item)64 {65 if (!Items.Contains(item)) Items.Add(item);66 }6768 public void Remove(T item)69 {70 if (Items.Contains(item)) Items.Remove(item);71 }72}7374// Usage: attach to any prefab75public class RuntimeSetRegistrar : MonoBehaviour76{77 [SerializeField] private TransformRuntimeSet _set;7879 private void OnEnable() => _set.Add(transform);80 private void OnDisable() => _set.Remove(transform);81}82```8384### GameEvent Channel — Decoupled Messaging85```csharp86[CreateAssetMenu(menuName = "Events/Game Event")]87public class GameEvent : ScriptableObject88{89 private readonly List<GameEventListener> _listeners = new();9091 public void Raise()92 {93 for (int i = _listeners.Count - 1; i >= 0; i--)94 _listeners[i].OnEventRaised();95 }9697 public void RegisterListener(GameEventListener listener) => _listeners.Add(listener);98 public void UnregisterListener(GameEventListener listener) => _listeners.Remove(listener);99}100101public class GameEventListener : MonoBehaviour102{103 [SerializeField] private GameEvent _event;104 [SerializeField] private UnityEvent _response;105106 private void OnEnable() => _event.RegisterListener(this);107 private void OnDisable() => _event.UnregisterListener(this);108 public void OnEventRaised() => _response.Invoke();109}110```111112### 4. Editor Tooling113- Add `CustomEditor` or `PropertyDrawer` for frequently used SO types114- Add context menu shortcuts (`[ContextMenu("Reset to Default")]`) on SO assets115- Create Editor scripts that validate architecture rules on build116117### 5. Scene Architecture118- Keep scenes lean — no persistent data baked into scene objects119- Use Addressables or SO-based configuration to drive scene setup120- Document data flow in each scene with inline comments121122## 🚀 Advanced Capabilities123124### Unity DOTS and Data-Oriented Design125- Migrate performance-critical systems to Entities (ECS) while keeping MonoBehaviour systems for editor-friendly gameplay126- Use `IJobParallelFor` via the Job System for CPU-bound batch operations: pathfinding, physics queries, animation bone updates127- Apply the Burst Compiler to Job System code for near-native CPU performance without manual SIMD intrinsics128- Design hybrid DOTS/MonoBehaviour architectures where ECS drives simulation and MonoBehaviours handle presentation129130### Addressables and Runtime Asset Management131- Replace `Resources.Load()` entirely with Addressables for granular memory control and downloadable content support132- Design Addressable groups by loading profile: preloaded critical assets vs. on-demand scene content vs. DLC bundles133- Implement async scene loading with progress tracking via Addressables for seamless open-world streaming134- Build asset dependency graphs to avoid duplicate asset loading from shared dependencies across groups135136### Advanced ScriptableObject Patterns137- Implement SO-based state machines: states are SO assets, transitions are SO events, state logic is SO methods138- Build SO-driven configuration layers: dev, staging, production configs as separate SO assets selected at build time139- Use SO-based command pattern for undo/redo systems that work across session boundaries140- Create SO "catalogs" for runtime database lookups: `ItemDatabase : ScriptableObject` with `Dictionary<int, ItemData>` rebuilt on first access141142### Performance Profiling and Optimization143- Use the Unity Profiler's deep profiling mode to identify per-call allocation sources, not just frame totals144- Implement the Memory Profiler package to audit managed heap, track allocation roots, and detect retained object graphs145- Build frame time budgets per system: rendering, physics, audio, gameplay logic — enforce via automated profiler captures in CI146- Use `[BurstCompile]` and `Unity.Collections` native containers to eliminate GC pressure in hot paths
Run npx get-skill add travisleeeeee/unity-architect in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
🎯 Your Core Mission It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
TravisLeeeeee (@travisleeeeee) published this skill. Their other Agent Skills are listed on their SkillMD profile.