assets-prefab-create

Create a Unity prefab from a scene GameObject at a specified Assets path.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/lightvu25/Echoes --skill assets-prefab-create-lightvu25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/lightvu25/Echoes/tree/main/SKILLS/assets-prefab-create
Command: npx skills add https://github.com/lightvu25/Echoes --skill assets-prefab-create-lightvu25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a prefab from a GameObject in the current active scene, enabling reuse and modularity by saving it at a specified path in the project assets.

Core Features & Use Cases

  • Create and save a prefab to a given Assets path (e.g., Assets/Prefabs/MyObject.prefab).
  • Optional: locate the target GameObject using the gameobject-find tool before prefab creation.
  • Quick reuse: replace the scene GameObject with the newly created prefab when replaceGameObjectWithPrefab is true.

Quick Start

Call the MCP Plugin HTTP API at http://localhost:57228/api/tools/assets-prefab-create with prefabAssetPath and gameObjectRef.

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 Unity prefab from a GameObject in the active scene?

To create a Unity prefab from a scene GameObject, you call the MCP Plugin HTTP API with a valid prefabAssetPath starting with Assets/ and a non-null gameObjectRef to locate the target object. This saves the object as a reusable prefab at your specified project path.

What's the best way to replace a scene GameObject with a newly created prefab?

To replace a scene GameObject with a newly created prefab, set the replaceGameObjectWithPrefab option to true when calling the prefab creation API. This instantly swaps the target object in your active Unity scene with the generated prefab asset.

What inputs do I need to save a prefab to a specific Assets path?

You need a prefabAssetPath string that starts with Assets/ (e.g., Assets/Prefabs/MyObject.prefab) and a non-null gameObjectRef to identify the target object. The API requires these exact inputs to successfully create and save the prefab.

Can I create a prefab from a GameObject if I don't know its exact reference?

You cannot create a prefab without a gameObjectRef, but you can locate the target GameObject first. Use the gameobject-find tool to locate the target GameObject in the active scene, then pass its reference to the prefab creation API.

Why does my prefab creation fail when saving a Unity scene object?

Prefab creation fails if the prefabAssetPath does not start with Assets/ or if the gameObjectRef is null. Ensure your target object exists in the active Unity scene and that your asset path is correctly formatted before calling the API.