
Aibridge Prefab Patch
Unity Prefab asset patch workflow for AIBridge.
Install
npx skills add FlameskyDexive/Legends-Of-Heroes --skill aibridge-prefab-patch -g -a claude-code -y- Repository
- FlameskyDexive/Legends-Of-Heroes933
- Category
- Engineering
- Updated
- 1mo ago
- License
- MIT
- Context cost
- Lightabout 1,145 tokens
- Runs scripts
- No, instructions only
What it does
Unity Prefab asset patch workflow for AIBridge. Use when modifying complex prefab assets with prefab patch operations, child or component creation, SerializedProperty writes, array edits, internal GameObject/component references, dry-run validation, or when deciding between prefab patch, inspector set_property, scene object commands, and direct Unity YAML fallback.
AIBridge Prefab Patch
Use prefab patch for complex Prefab asset edits that need multiple operations in one load/save cycle. Use inspector set_property for a single simple serialized field, and inspector set_properties for small batched field edits. Use gameobject、transform、inspector for scene objects. If the requested Prefab/Scene/custom .asset operation is not supported by AIBridge, load unity-yaml-editing and follow its direct UnityYAML rules.
$CLI means the platform-appropriate AIBridge CLI invocation, usually ./.aibridge/cli/AIBridgeCLI.exe on Windows.
参数选择
- Prefer
--ops <file>for multi-step edits, nested JSON, arrays, references, or anything run from PowerShell. - Use
--ops-json <json>only for one or two very small operations. - Put temporary operation files under
.aibridge/patch_ops/. - Always run
--dryRun truebefore writing the prefab.
标准流程
- Find the target prefab with
asset find/search --format paths. - Inspect structure with
prefab get_hierarchy --prefabPath "<prefab>". - Create
.aibridge/patch_ops/<task>.json. - Run dry-run:
$CLI prefab patch --prefabPath "Assets/Prefabs/Player.prefab" --ops ".aibridge/patch_ops/player_hp_patch.json" --dryRun true
- If dry-run succeeds, run the same command without
--dryRun true. - Re-check hierarchy/properties, then run
compile unityandget_logs --logType Error.
