Skip to content
SkillModel-led1,808 tokens in use

unity-scriptableobjects

Unity 6.3 LTS ScriptableObject architecture for your coding agent: config assets, shared runtime variables, event channels and runtime sets that replace singletons.

9,684 stars on the repository Apache License 2.0gamedev-skills/awesome-gamedev-agent-skills · skills/unity/unity-scriptableobjects
npx skills add gamedev-skills/awesome-gamedev-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing unity-scriptableobjects costs

80tokens idle
1,808tokens in use
2,737tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter8/15
  • Structure23/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity92
  • Maintenance96
  • Community60
  • Maturity24
  • Momentum40

This skill shows an agent how to use ScriptableObject assets in Unity 6.3 LTS for shared data and for decoupling systems. It covers CreateAssetMenu config assets, runtime variables that reset when Play mode starts, event channels, and creating .asset files from editor code so Unity writes a valid GUID.

It also lists the traps: Play mode edits that persist in the Editor, OnEnable resets that stop working when Reload Domain is off, renamed fields that wipe data, and assets stripped from a build because nothing references them.

What You Get

  • A six-step workflow from class definition to verification
  • Patterns for a weapon data config asset, a float variable with a Play mode reset, and an editor script that creates assets
  • An event channel reference with listeners, typed payloads and a runtime set that replaces FindObjectsByType scans
  • Verification routes that read the .asset YAML, query the Editor through the Unity CLI, or run EditMode tests
  • A gotcha list covering Play mode persistence, Reload Domain off, FormerlySerializedAs and stripped assets

Common Use Cases

  • Replacing a singleton game manager with shared variable assets
  • Making weapons, items or cards data-driven so designers edit them in the Inspector
  • Wiring the HUD, audio and respawner to a player-died event without direct references
  • Finding why a value changed after leaving Play mode

What Makes It Unique

The skill treats a ScriptableObject asset as a YAML file the agent can read and check without opening the Editor, and it tells the agent never to hand-write a new .asset because the script GUID must match the .meta file. It also covers the Reload Domain off case that breaks the usual OnEnable reset, which many tutorials skip.

Under The Hood

The agent loads the SKILL.md and reads the event channels reference only when it adds an event channel or runtime set. It writes C# scripts into your project, including editor scripts that create asset files, and it can run them through the Unity command line tool, batch mode or a menu item. To verify it greps the .asset YAML files, runs the project checker from the unity-csharp-scripting skill, and can query a ready Editor. It does not fetch web pages or call outside services.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers