Agent skill

Unity Scriptableobjects

by gamedev-skills in gamedev-skills/awesome-gamedev-agent-skills

Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries.

Apache-2.0Auto-check passedGame Development

Install Unity Scriptableobjects

skills CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-scriptableobjects -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gamedev-skills/awesome-gamedev-agent-skills unity-scriptableobjects --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/unity/unity-scriptableobjects .claude/skills/unity-scriptableobjects && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unity-scriptableobjects
GitHub stars
1.4k
Token cost
~1.4k tokens
SKILL.md length
555 words
Files
2 (incl. references)
Skills in repo
53
Repo updated
First seen
Licence
Apache-2.0

At a glance

Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries.

  • Works in 3 steps: Config/data asset → Shared runtime variable (decouples… → Creating an instance at runtime (not an…
  • Designing data-driven systems
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Unity Scriptableobjects is an agent skill from gamedev-skills/awesome-gamedev-agent-skills. Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries. Use when designing data-driven systems, replacing singletons/managers, creating .asset data with CreateAssetMenu, or when the user mentions ScriptableObject, SO architecture, or data assets.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/event-channels.md`).

It sits in Game Development, covering Game development. The repository describes itself as: 74 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic… The licence is Apache-2.0.

When your agent uses it

  • Designing data-driven systems
  • Replacing singletons/managers
  • Creating .asset data with CreateAssetMenu
  • The user mentions ScriptableObject

Example prompts

  • “/unity-scriptableobjects”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Config/data asset
  2. Shared runtime variable (decouples producer from consumer)
  3. Creating an instance at runtime (not an asset on disk)

What it can do on your machine

Read from SKILL.md and the folder at commit d4b0e35. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unity Scriptableobjects loads about 1.4k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 555 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gamedev-skills/awesome-gamedev-agent-skills at commit d4b0e35, republished under its Apache-2.0 licence (© gamedev-skills). 555 words, ~1,443 tokens.

Download SKILL.mdSave it as .claude/skills/unity-scriptableobjects/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
unity-scriptableobjects
description
Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries. Use when designing data-driven systems, replacing singletons/managers, creating .asset data with CreateAssetMenu, or when the user mentions ScriptableObject, SO architecture, or data assets.

Unity ScriptableObject Architecture

Use ScriptableObject assets to store shared data and decouple systems in Unity 6.3 LTS — configuration, event channels, and registries that live as project assets instead of being hard-wired into scenes or singletons. Targets Unity 6.3 LTS (6000.3).

When to use

  • Use when you need designer-editable config (weapon stats, level data), to share one value between unrelated systems, to decouple senders from listeners via event channels, or to build a runtime registry of active objects — without a static/singleton manager.
  • Use when the project has *.asset data files backed by : ScriptableObject classes.

When not to use: per-instance runtime state that differs per GameObject (that belongs on a MonoBehaviour) — a ScriptableObject asset is shared by everyone who references it. Saving player progress to disk → save-systems. Plain DTOs that never need to be an asset can just be [System.Serializable] classes.

Core workflow

  1. Define the class deriving from ScriptableObject and tag it with [CreateAssetMenu] so designers can create instances from the Assets menu.
  2. Create one or more .asset instances in the Project window; each is a shared, named piece of data referenced by [SerializeField] fields.
  3. Reference, don't copy. MonoBehaviours hold a reference to the asset; they all see the same data, so changing the asset changes every consumer.
  4. For decoupling, model signals and shared variables as ScriptableObjects: a "FloatVariable" the HUD reads and the player writes; an "event channel" the player raises and many systems listen to. Neither side references the other.
  5. Reset runtime mutations in OnEnable if the asset is mutated during play, because edits made in the Editor at runtime persist on the asset (a frequent source of "my values changed after I played").
  6. Verify by inspecting the asset values during Play mode and confirming consumers react.

Patterns

1. Config/data asset
csharp
using UnityEngine;

[CreateAssetMenu(fileName = "WeaponData", menuName = "Game/Weapon Data", order = 0)]
public class WeaponData : ScriptableObject
{
    public string displayName = "Pistol";
    public int    damage = 10;
    public float  fireRate = 0.25f;
    public GameObject projectilePrefab;
}
csharp
public class Weapon : MonoBehaviour
{
    [SerializeField] private WeaponData data;   // assign the shared asset in the Inspector
    private void Fire() => Debug.Log($"{data.displayName} for {data.damage}");
}
2. Shared runtime variable (decouples producer from consumer)
csharp
[CreateAssetMenu(menuName = "Game/Float Variable")]
public class FloatVariable : ScriptableObject
{
    [SerializeField] private float initialValue;
    [System.NonSerialized] public float runtimeValue;   // not saved to the asset

    private void OnEnable() => runtimeValue = initialValue;  // reset each play session
}
// Player writes playerHealth.runtimeValue; the HUD reads it — neither references the other.
3. Creating an instance at runtime (not an asset on disk)
csharp
// For transient SO data you build in code (e.g. a generated config).
var temp = ScriptableObject.CreateInstance<WeaponData>();
temp.damage = 25;
// ...use temp...  Destroy(temp);   // clean up runtime-created instances
Show full SKILL.md (239 more words)Show less

Pitfalls

  • Editing an SO at runtime persists in the Editor — values you change during Play stay changed on the asset after you stop. Keep mutable runtime state in [NonSerialized] fields reset in OnEnable, or it will surprise you. (In a build, asset edits do not persist across launches.)
  • Disabled Domain Reload skips your OnEnable reset — with Enter Play Mode Options enabled and Reload Domain off (a Unity 6.3 LTS fast-iteration setting), already-loaded SOs are not re-created when you press Play, so OnEnable never fires and runtimeValue keeps its value from the previous session. Reset explicitly from an ISerializationCallbackReceiver or a scene-load hook instead of relying on OnEnable alone.
  • Expecting per-object state — every reference points to the same asset. If two enemies need different current HP, store HP on the MonoBehaviour, not the shared SO.
  • No frame lifecycle — ScriptableObjects have OnEnable/OnDisable/OnDestroy but no Update. Don't expect per-frame callbacks.
  • Using SOs as a save file — they're authoring assets, not runtime persistence; write progress with save-systems instead.
  • Leaking CreateInstance objects — runtime-created instances are not garbage-collected like plain C# objects; Destroy them when done.

References

  • For the event-channel pattern (a GameEvent SO + listeners, type-safe payloads) and runtime sets/registries (a shared list of active enemies), read references/event-channels.md.
  • Primary docs: Unity Manual "ScriptableObject" (/Manual/class-ScriptableObject.html) and ScriptReference/ScriptableObject, ScriptReference/CreateAssetMenuAttribute.
  • unity-csharp-scripting — the MonoBehaviours that consume these assets.
  • save-systems — persisting state to disk (what SOs are not for).
  • card-game / rpg / survival-crafting — genres that lean on SO-driven data.

© gamedev-skills, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/unity/unity-scriptableobjects of gamedev-skills/awesome-gamedev-agent-skills.

  • SKILL.md
  • references/event-channels.md

Open the folder on GitHubat commit d4b0e35

Compare with similar skills

Unity Scriptableobjects next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unity Scriptableobjects compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Scriptableobjects this skillgamedev-skills/awesome-gamedev-agent-skills1.4k—~1.4kAutomated safety check: PassApache-2.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
Sprite Genaldegad/sprite-gen2.6k—~4.5kAutomated safety check: PassApache-2.0
2D Map and Scene Generator0x0funky/agent-sprite-forge4.3k—~2.9kAutomated safety check: PassMIT
Fantasy Framework Development Guideqq362946/Fantasy1.4k—~5.8kAutomated safety check: PassCustom licence
Package AddIvanMurzak/Unity-MCP4.4k1 repos~665Automated safety check: PassApache-2.0

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • Sprite Gen

    aldegad/sprite-gen

    Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.

    2.6k GitHub stars~4.5k tokensUpdated today
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.3k GitHub stars~2.9k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Development and review guide for the Fantasy C# distributed game server framework: ECS, FTask, routing, service discovery, config and databases.

    1.4k GitHub stars~5.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Package Add

    IvanMurzak/Unity-MCP

    Install a Unity package from the registry, a Git URL, or a local path.

    4.4k GitHub starsUsed in 1 repo~665 tokens
    Game DevelopmentAuto-check passed
  • Plays an authorized Game Boy or Game Boy Color ROM in one persistent headless Coffee GB session, inspecting frames and keeping an action trace for replay or tests.

    1.2k GitHub stars~1.3k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed

More from gamedev-skills/awesome-gamedev-agent-skills

All 53 skills in this repo
  • Create Game Assets

    gamedev-skills/awesome-gamedev-agent-skills

    Plan, generate, source, normalize, and validate cohesive visual game assets.

    1.4k GitHub stars~2k tokensUpdated 11 days ago
    Auto-check passed
  • Roblox UI

    gamedev-skills/awesome-gamedev-agent-skills

    Build production Roblox interfaces with ScreenGui/PlayerGui lifecycle, responsive UDim2 layouts, safe insets, reusable editable Instances, cross-device input and selection, restrained motion…

    1.4k GitHub stars~2.9k tokensUpdated 11 days ago
    Auto-check passed
  • AI Behavior Trees Utility AI

    gamedev-skills/awesome-gamedev-agent-skills

    Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential…

    1.4k GitHub stars~2k tokensUpdated 11 days ago
    Auto-check passed
  • Bevy Ecs

    gamedev-skills/awesome-gamedev-agent-skills

    Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the…

    1.4k GitHub stars~2k tokensUpdated 11 days ago
    Auto-check passed
  • Card Game

    gamedev-skills/awesome-gamedev-agent-skills

    Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.

    1.4k GitHub stars~1.6k tokensUpdated 11 days ago
    Auto-check passed
  • Fps Shooter

    gamedev-skills/awesome-gamedev-agent-skills

    Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.

    1.4k GitHub stars~1.5k tokensUpdated 11 days ago
    Auto-check passed

Questions about Unity Scriptableobjects

What does Unity Scriptableobjects do?

Architect Unity 6.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries. Unity Scriptableobjects is an agent skill from gamedev-skills/awesome-gamedev-agent-skills.3 LTS data and decoupling with ScriptableObjects: config/data assets, shared runtime variables, event channels, and runtime sets/registries.

When should I use Unity Scriptableobjects?

Unity Scriptableobjects fits situations like: designing data-driven systems; replacing singletons/managers; creating .asset data with CreateAssetMenu; the user mentions ScriptableObject.

How do I install Unity Scriptableobjects in Claude Code?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-scriptableobjects -a claude-code`. Or copy the skill folder (skills/unity/unity-scriptableobjects in gamedev-skills/awesome-gamedev-agent-skills) into .claude/skills/unity-scriptableobjects in your project. Claude Code loads it when a task matches its description.

How do I install Unity Scriptableobjects in Codex?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-scriptableobjects -a codex`. Or copy the skill folder (skills/unity/unity-scriptableobjects in gamedev-skills/awesome-gamedev-agent-skills) into .agents/skills/unity-scriptableobjects in your project. Codex loads it when a task matches its description.

Can I use Unity Scriptableobjects in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-scriptableobjects -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unity-scriptableobjects, .gemini/skills/unity-scriptableobjects, .github/skills/unity-scriptableobjects and .opencode/skills/unity-scriptableobjects in your project.

What does Unity Scriptableobjects need to run?

SKILL.md names no scripts, command-line tools or credentials: Unity Scriptableobjects is instructions for the agent only.

Does Unity Scriptableobjects access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unity Scriptableobjects safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unity Scriptableobjects use?

Unity Scriptableobjects is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unity Scriptableobjects use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 938 tokens, read only when the agent opens those files.

What are the alternatives to Unity Scriptableobjects?

Skills that share tags, products or a category with Unity Scriptableobjects: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), Sprite Gen (aldegad/sprite-gen, 2.6k stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.3k stars) and Fantasy Framework Development Guide (qq362946/Fantasy, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Scriptableobjects?

gamedev-skills (a GitHub organization) maintains it in gamedev-skills/awesome-gamedev-agent-skills, which has 1,356 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on September 27, 2026.

Source: gamedev-skills/awesome-gamedev-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.