Skip to main content

prefab_overrides

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: prefabs  ·  Module: services.registry.capability_adapter

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

List prefab overrides, trace a serialized property through variants, or apply or revert selected overrides.

Parameters​

NameTypeRequiredDescription
actionLiteral['list_overrides', 'trace_property', 'revert_overrides', 'apply_overrides']yesFeature action to perform.
prefab_pathstr | None—Prefab asset path (e.g., Assets/Prefabs/MyPrefab.prefab). For save/close, when supplied it must match the current Prefab Stage.
targetstr | int | None—For create_from_gameobject: instance ID (integer or numeric string), unique name, or full hierarchy path (e.g. 'Parent/Child' or '/Parent/Child') in the active scene/current prefab stage. Stage names/paths take precedence. Numeric targets are IDs; ambiguous names/paths fail. For modify_contents: saved prefab object name or child path; omit to target the root. Use returned rootObjectName/rootObjectPath, which may differ from the source instance name. IDs do not apply to isolated prefab contents.
override_idslist[str] | None—Explicit overrideId values from list_overrides; 1-100 unique values. Required for revert_overrides/apply_overrides. Select object/component/property entries via their IDs; no implicit apply-all.
object_idint | None—list_overrides filter, or exact component ID on the trace_property target.
property_filterstr | None—list_overrides: case-insensitive property-path substring filter.
offsetint—list_overrides offset, zero or greater.
page_sizeint | None—Page size 1-500. get_hierarchy defaults to 50; list_overrides defaults to 100.
property_pathstr | None—trace_property only: exact serialized leaf path.
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

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

Examples​

List the first 25 overrides on an instance in the scene. Replace Player with the scene instance you intend to inspect.

MCP arguments
{
"action": "list_overrides",
"target": "Player",
"page_size": 25
}