unity-prefab

Create, instantiate, and manage Unity prefabs and prefab variants in scenes.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-prefab-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-prefab
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/prefab
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-prefab-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Unity prefabs manually through the editor is slow and error-prone, especially when spawning many instances, applying instance changes back to source assets, or tracking overrides across a scene. This Skill exposes prefab operations as callable skills so an AI agent can perform them programmatically. ## Core Features & Use Cases - Prefab Lifecycle Management: Create prefabs from scene objects, instantiate single or batched instances, unpack instances, and apply or revert overrides. - Prefab Variants & Direct Asset Editing: Create prefab variants and set serialized properties (basic types, vectors, colors, asset references) directly on prefab assets without instantiating them. - Scene Discovery: Find all instances of a prefab in the current scene and inspect override counts on any instance. - Use Case: Spawn 10 enemy prefabs at spaced positions with a single prefab_instantiate_batch call instead of 10 separate API calls, then tune each enemy's stats by editing the source prefab with prefab_set_property. ## Quick Start Ask the agent to instantiate the prefab at Assets/Prefabs/Enemy.prefab three times along the x-axis using the batch instantiation skill.

Frequently Asked Questions about unity-prefab

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

FAQPage Schema
How do I instantiate multiple prefabs in Unity at once?

Use prefab_instantiate_batch with an items array containing prefabPath, position, rotation, scale, and parent for each instance. It spawns all prefabs in one API call and returns per-item success results, which is far more efficient than looping single instantiations.

How to apply prefab instance changes back to the prefab asset in Unity?

Use prefab_apply with the instance's name, instanceId, or path to write instance changes back to the source prefab asset. To apply only accumulated overrides, use prefab_apply_overrides; to discard them, use prefab_revert_overrides.

Can I edit a prefab asset without instantiating it in Unity?

Yes, prefab_set_property modifies serialized properties directly on the prefab asset file. It supports basic types, vectors, colors, enums, quaternions, and asset references via assetReferencePath, and can target child objects with gameObjectName.

How do I find all instances of a prefab in a Unity scene?

Call prefab_find_instances with the prefab asset path and an optional result limit (default 50). It returns each instance's name, hierarchy path, entityId, and instanceId, which you can reuse in other prefab skills.

Why does prefab_set_property return SEMANTIC_INVALID?

SEMANTIC_INVALID means the value could not be parsed or the property is an Object reference field rather than a basic type. For Object references like Materials or AudioClips, pass assetReferencePath with the asset path instead of value.