assets-prefab-create
Create Unity prefabs from GameObjects in active scenes to reuse assets and maintain consistency across projects. Specify save paths and optionally replace original objects.
Instructions
Create a prefab from a GameObject in the current active scene. The prefab will be saved in the project assets at the specified path. Use 'gameobject-find' tool to find the target GameObject first.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefabAssetPath | Yes | Save path for the new prefab. Example: "Assets/Prefabs/MyPrefab.prefab" | |
| gameObjectRef | Yes | Source GameObject reference. SCHEMA: {"name":"ObjectName"} or {"instanceID":12345} or {"path":"hierarchy/path"} | |
| replaceGameObjectWithPrefab | No | If true, the prefab will replace the GameObject in the scene. | true |