Skip to content
Development
Skill

/scriptableobject

Manage ScriptableObject assets

From plugin
unity-skills
1.9k83 skills4 commands

Claude Code

$ npx -y skills add Besty0728/Unity-Skills --skill scriptableobject --agent claude-code

SKILL.md

scriptableobject.SKILL.md
name: unity-scriptableobject
description: Manage ScriptableObject assets

Unity ScriptableObject Skills

Create and manage ScriptableObject assets. Parameters come from the schema (`GET /skills/schema?names=<skill>&wire=v2`); execution and dryRun rules: root [SKILL.md](../../SKILL.md).

When to use

  • Creating or editing ScriptableObject data assets
  • Finding ScriptableObject instances
  • Scripting ScriptableObject management

Rules

  • Changes are saved to the asset automatically. There is no save skill.
  • To create a ScriptableObject script, use the [script](../script/SKILL.md) module with template `"ScriptableObject"`.
  • Choose the setter by what the field is. `scriptableobject_set` and `scriptableobject_set_batch` reach only top-level public simple fields (reflection). Use `scriptableobject_set_serialized_property` (and its `_batch`) for nested paths, arrays and lists, object references, private `[SerializeField]` fields, gradients, curves and `[Flags]` enums.
  • `scriptableobject_import_json` with no changed serialized field returns `success: true` plus a `warning`. Treat the warning as "nothing was written" and check the field names against `scriptableobject_export_json` output.

Pitfalls

  • `scriptableobject_create_type`, `scriptableobject_get_properties`, `scriptableobject_read`, `scriptableobject_set_property`, `scriptableobject_set_field` and `scriptableobject_save` do not exist. Use `scriptableobject_get` or `scriptableobject_get_serialized_properties` to read, `scriptableobject_set` or `scriptableobject_set_serialized_property` to write.
  • `scriptableobject_export_json` with `savePath` writes a file, so it is a write even though it is read-only in every other respect. Leave `savePath` out to get the JSON inline. The two return shapes are exclusive, so reading the data with `savePath` costs a second call.

Skills

scriptableobject_create

Create a new ScriptableObject asset. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | typeName | string | Yes | - | ScriptableObject type name | | savePath | string | Yes | - | Asset save path |

scriptableobject_get

Get properties of a ScriptableObject. **Parameters:**

  • `assetPath` (string): Asset path.

scriptableobject_set

Set a top-level public field/property on a ScriptableObject via reflection. For nested paths, arrays, object references or private `[SerializeField]` fields use `scriptableobject_set_serialized_property`. **Parameters:**

  • `assetPath` (string): Asset path.
  • `fieldName` (string): Field or property name.
  • `value` (string): Value to set, parsed per member type as in `component_set_property` (bools `true`/`false`/`1`/`0`/`yes`/`no`/`on`/`off`, anything else rejected; an AnimationCurve as a preset or the JSON curve below).

scriptableobject_list_types

List available ScriptableObject types in the project. **Parameters:**

  • `filter` (string, optional): Filter by name.

scriptableobject_duplicate

Duplicate a ScriptableObject asset. **Parameters:**

  • `assetPath` (string): Source asset path to duplicate.

scriptableobject_set_batch

Set multiple fields on a ScriptableObject at once. fields: JSON object {fieldName: value, ...}

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | assetPath | string | Yes | - | Asset path of the ScriptableObject | | fields | string | Yes | - | JSON object with field-value pairs, e.g. `{"fieldName": "value", ...}` |

**Returns:** `{ success, fieldsSet, failed, results: [{ field, error }] }`: a key that is not a writable public field/property, or whose value its type rejects, fails on its own (listed in `results`) while the other keys are still set; malformed `fields` JSON is rejected before anything is written.

scriptableobject_get_serialized_properties

List Inspector serialized properties of a ScriptableObject asset โ€” `propertyPath`, type, and current value for every serialized field, including private `[SerializeField]` and nested/array children. Use the returned `propertyPath` values with `scriptableobject_set_serialized_property`.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | assetPath | string | Yes | - | Asset path of the ScriptableObject | | includeChildren | bool | No | `true` | Recurse into nested/array child properties | | limit | int | No | `200` | Maximum number of properties to return | | includeHidden | bool | No | `false` | Also list fields the Inspector hides (`[HideInInspector]` members and Unity's `m_ObjectHideFlags` / `m_PrefabInstance` bookkeeping); they count toward `limit` |

**Returns:** `{ success, path, typeName, properties: [{ propertyPath, name, displayName, propertyType, type, isArray, editable, value }] }`; an `ObjectReference` property also has `referenceState` (`none`, `missing` or `assigned`), which tells a never-assigned reference from one whose target was deleted when `value` reads `"null"`.

scriptableobject_set_serialized_property

Set a single Inspector serialized property by `propertyPath`. Works where `scriptableobject_set` cannot: nested fields, arrays/lists, `UnityEngine.Object` references, private `[SerializeField]` fields, gradients, animation curves, and `[Flags]` enums.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | assetPath | string | Yes | - | Asset path of the target ScriptableObject | | propertyPath | string | Yes | - | Serialized property path (see syntax below); `speed` auto-falls back to `m_Speed` / `_speed` | | value | string | No | `null` | Value to set (format depends on property type) | | valueAssetPath | string | No | `null` | For ObjectReference properties: asset path of the asset to reference | | valueObjectType | string | No | `null` | Optional type filter for the referenced asset (e.g. `"Sprite"`, useful for sub-assets) |

**property

Read more
@besty0728
Ships withunity-skills

REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills ๐ŸŽ‰ We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs โ†’ The current official maintenance baseline is Unity 2022.3+.

Stars on GitHub

Momentum

stars in total
1.9k
Star history of Besty0728/Unity-Skills on GitHub, a chart by star-history.com

Other skills on unity-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโ€ฆ

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android โ€” semantic ARIA roles and labels,โ€ฆ

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commitsโ€ฆ

react1d252k
@facebook@facebookInstall Skill

Questions about scriptableobject.

Which coding agents can use scriptableobject?
scriptableobject installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.