scriptableobject-architecture

Create ScriptableObject assets for Unity data configuration and event channels.

71|11|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/nlelouche/Unity-SkillForge --skill scriptableobject-architecture-nlelouche
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scriptableobject-architecture
Source: https://github.com/nlelouche/Unity-SkillForge/tree/main/.agent/skills/01-architecture/scriptableobject-architecture
Command: npx skills add https://github.com/nlelouche/Unity-SkillForge --skill scriptableobject-architecture-nlelouche

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a robust framework for managing game data and events using Unity's ScriptableObject system, decoupling logic and improving maintainability.

Core Features & Use Cases

  • Data Configuration: Define and manage game data (e.g., weapon stats, enemy attributes) in the Inspector.
  • Event Channels: Implement a decoupled event system using ScriptableObjects for communication between game systems.
  • Runtime Sets: Track active game objects (e.g., enemies, collectables) without relying on expensive searches.
  • Use Case: Create a WeaponConfigSO to define damage, fire rate, and projectile prefab for a weapon, then use GameEventSO to notify systems when a player takes damage, and EnemyRuntimeSetSO to keep track of all active enemies.

Quick Start

Use the scriptableobject-architecture skill to create a GameEventSO asset named 'OnPlayerDied'.

Frequently Asked Questions about scriptableobject-architecture

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

FAQPage Schema
How do I decouple MonoBehaviours in Unity for data-driven design?

Decoupling MonoBehaviours for data-driven design in Unity is achieved by centralizing data and event logic within ScriptableObject assets, removing direct dependencies between game systems.

What is the best way to manage game configuration data using Unity ScriptableObjects?

Managing game configuration data with Unity ScriptableObjects involves defining variables like weapon stats or enemy attributes directly in the Inspector, creating reusable assets that separate data from logic.

How do I create a decoupled event system in Unity with ScriptableObjects?

A decoupled event system in Unity uses ScriptableObject event channels to broadcast notifications, allowing systems like player health and UI to communicate without holding direct object references.

How can I track active game objects in Unity without expensive Find calls?

Tracking active game objects without expensive searches uses ScriptableObject runtime sets, dynamically managing collections of entities like enemies or collectables that register and unregister themselves.

Does ScriptableObject architecture work for tracking runtime collections across multiple scenes?

ScriptableObject architecture supports tracking runtime collections across multiple scenes by maintaining dynamic sets of active game objects in standalone assets that persist independently of scene hierarchy.

When should I not use ScriptableObjects for event broadcasting in Unity?

ScriptableObject event broadcasting should be avoided when tight real-time execution order is required or when systems demand strict garbage collection control, as asset-based decoupling introduces indirect invocation.