scriptableobject-architecture

Generate C# ScriptableObject templates and event channels for Unity projects.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/Criezzz/Gametopia2026 --skill scriptableobject-architecture-criezzz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scriptableobject-architecture
Source: https://github.com/Criezzz/Gametopia2026/tree/main/.agent/skills/scriptableobject-architecture
Command: npx skills add https://github.com/Criezzz/Gametopia2026 --skill scriptableobject-architecture-criezzz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Reduce tight coupling between MonoBehaviour logic and game data by using ScriptableObjects as inspector-configurable single sources of truth and event channels, enabling designers to tweak behavior without code changes.

Core Features & Use Cases

  • Data-driven configuration: Create ScriptableObject-based config assets (e.g., WeaponConfig) that multiple systems can share without duplication.
  • SO-based event channels: Broadcast game events via GameEventSO and respond with GameEventListener components to decouple senders and listeners.
  • Runtime sets and cross-scene sharing: Track active objects with RuntimeSetSO<T> and share configuration across scenes for consistent behavior.
  • Use Case: Implement an OnDoorOpened GameEventSO asset that triggers audio, UI updates, and quest progress without the Door needing direct references to those systems.

Quick Start

Generate a WeaponConfig ScriptableObject named WeaponConfig with fields Damage (float) and FireRate (float) using the provided so_gen.py generator.

Frequently Asked Questions about scriptableobject-architecture

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

FAQPage Schema
How do I decouple gameplay data from MonoBehaviour logic in Unity?

Use inspector-configurable ScriptableObjects as single sources of truth to decouple gameplay data from MonoBehaviour logic. This enables designers to tweak behavior without code changes and reduces tight coupling between systems.

How do I broadcast game events in Unity without direct references between systems?

Broadcast game events via GameEventSO assets and respond with GameEventListener components. This ScriptableObject-based event channel approach decouples senders and listeners, allowing a single event to trigger audio, UI, and quest updates without direct references.

What's the best way to share configuration across Unity scenes?

Share configuration across Unity scenes by creating ScriptableObject-based config assets. These assets act as shared data containers that maintain consistent behavior across scenes and allow multiple systems to access the same data without duplication.

How do I track active objects across scenes in Unity?

Track active objects across scenes using RuntimeSetSO<T> types. These ScriptableObject-based runtime sets provide a centralized collection to monitor active objects, reducing coupling between systems that need to query or interact with those objects.

Can I generate ScriptableObject templates automatically instead of writing C# manually?

Yes, you can generate ScriptableObject templates automatically using the included Python generator script. It scaffolds C# ScriptableObject assets with CreateAssetMenu attributes and specified fields, eliminating manual boilerplate code creation.

Does this ScriptableObject architecture require any external packages or dependencies?

No, this ScriptableObject architecture has zero dependencies. It relies solely on Unity's built-in ScriptableObject system and C# scripts, requiring no external packages to implement data containers, event channels, and runtime sets.