assets-prefab-create

Create Unity prefabs from scene GameObjects and save to Assets paths.

3.8k|349|Updated Apr 2, 2025
One-click install
npx skills add https://github.com/IvanMurzak/Unity-MCP --skill assets-prefab-create-ivanmurzak
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/IvanMurzak/Unity-MCP/tree/main/Unity-MCP-Plugin/.claude/skills/assets-prefab-create
Command: npx skills add https://github.com/IvanMurzak/Unity-MCP --skill assets-prefab-create-ivanmurzak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a prefab from a GameObject in the active Unity scene and save it to the specified Assets path. Creates folders recursively if they do not exist. If the source GameObject is already a prefab instance and 'connectGameObjectToPrefab' is true, a Prefab Variant is created automatically. To create a Prefab Variant from an existing prefab asset, provide 'sourcePrefabAssetPath' instead of 'gameObjectRef'. Use 'gameobject-find' tool to locate the target GameObject first.

Core Features & Use Cases

  • Create a new prefab from a live GameObject in the current scene and save it under the given Assets path.
  • If the source GameObject is already a prefab instance and connectGameObjectToPrefab is true, a Prefab Variant is created automatically.
  • When provided with sourcePrefabAssetPath, generate a Prefab Variant from an existing prefab asset.

Quick Start

Create a prefab from the active scene GameObject and save it to the specified Assets path.

Frequently Asked Questions about assets-prefab-create

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a prefab from a GameObject in a Unity scene?▼

To create a prefab from a GameObject in your active Unity scene, specify the target GameObject and an Assets path. The process saves the live scene object as a new reusable prefab at the designated location.

How do I save a prefab to an Assets path that doesn't exist yet?▼

When saving a prefab to a specified Assets path, missing folders are created recursively. This ensures the full directory structure exists before the new prefab asset is written.

Can I create a Prefab Variant from an existing prefab asset in Unity?▼

Yes, you can create a Prefab Variant by providing a sourcePrefabAssetPath. If the target GameObject is already a prefab instance, a variant is generated automatically when connecting it.

How do I link a scene GameObject to a newly created prefab?▼

You can link a scene GameObject to a newly created prefab by enabling the connectGameObjectToPrefab option. This replaces the scene object with an instance of the generated prefab asset.

What is the best way to convert multiple scene objects into reusable Unity prefabs?▼

The best way to convert scene objects into reusable Unity prefabs is to locate each target GameObject and save it to a specified Assets path. This process handles recursive folder creation and optional scene linking automatically.