prefab
Manage Unity prefabs: create variants, apply or revert overrides, instantiate, and inspect prefab status.
Instructions
Advanced Unity prefab operations. Actions:
get_info: Get prefab status (instance/asset type, variant, overrides)
create_variant: Create a prefab variant from a base prefab
get_overrides: List property modifications, added/removed components
apply_overrides: Apply all instance overrides back to the prefab asset
revert_overrides: Revert all instance overrides
unpack: Unpack a prefab instance (outermost or completely)
open: Open prefab in prefab editing mode
close: Close prefab editing mode, return to main stage
instantiate: Instantiate a prefab into the scene with optional position/parent
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Prefab action to perform | |
| objectId | No | Instance ID of a prefab instance | |
| position | No | JSON position object for instantiate, e.g. {"x":0,"y":1,"z":0} | |
| assetPath | No | Path to the prefab asset (e.g. Assets/Prefabs/Player.prefab) | |
| completely | No | For unpack: "true" to unpack completely, "false" for outermost only | |
| objectPath | No | Hierarchy path of a prefab instance in the scene | |
| parentPath | No | Hierarchy path of parent for instantiate | |
| variantPath | No | Destination path for create_variant |