Back to Unity Mcp

manage_scriptable_object

website/docs/reference/tools/scripting_ext/manage_scriptable_object.md

9.7.11.7 KB
Original Source

manage_scriptable_object

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: scripting_ext  ·  Module: services.tools.manage_scriptable_object

Description

Creates and modifies ScriptableObject assets using Unity SerializedObject property paths.

Parameters

NameTypeRequiredDescription
actionLiteral['create', 'modify']yesAction to perform: create or modify.
type_namestr | NoneNamespace-qualified ScriptableObject type name (for create).
folder_pathstr | NoneTarget folder under Assets/... (for create).
asset_namestr | NoneAsset file name without extension (for create).
overwritebool | str | NoneIf true, overwrite existing asset at same path (for create).
targetdict[str, Any] | str | NoneTarget asset reference {guid|path} (for modify).
patcheslist[dict[str, Any]] | str | NonePatch list (or JSON string) to apply. For object references: use {"ref": {"guid": "..."}} or {"value": {"guid": "..."}}. For Sprite sub-assets: include "spriteName" in the ref/value object. Single-sprite textures auto-resolve from guid/path alone.
dry_runbool | str | NoneIf true, validate patches without applying (modify only).

Returns

A dict containing the Unity response. The exact shape depends on the action.

Examples

<!-- examples:start -->

No examples yet. Add usage examples here — they will be preserved across regenerations.

<!-- examples:end -->