coherence-nested-prefabs

Detects and synchronizes nested CoherenceSync prefabs using PrefabSyncGroup in coherence.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-nested-prefabs-cmitchellvfs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coherence-nested-prefabs
Source: https://github.com/cmitchellVFS/Scrabble/tree/main/.claude/skills/coherence-nested-prefabs
Command: npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-nested-prefabs-cmitchellvfs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When one CoherenceSync prefab is nested inside another at edit time, each client instantiates its own copy of the nested child as a separate network entity, breaking identity and lifetime synchronization across clients. This Skill detects that asset-level nesting and fixes it with PrefabSyncGroup. ## Core Features & Use Cases - Asset-level detection: Scans prefab YAML for PrefabInstance blocks referencing other CoherenceSync prefabs, keyed off the actual CoherenceSync script GUID, to find unsynchronized nesting before runtime symptoms appear. - PrefabSyncGroup fix: Guides adding Coherence.Toolkit.PrefabSyncGroup to the parent prefab root, baking the synced ids field, and collapsing per-client child copies onto one host-authoritative entity via NoDuplicates uniqueness. - Use Case: You author a gate prefab containing a harvestable prefab, both with CoherenceSync. Use this Skill to detect the nesting, add PrefabSyncGroup to the gate root, bake, and verify the nested entity syncs correctly on remote clients. ## Quick Start Check my coherence prefabs for nested CoherenceSync prefabs and fix any unsynchronized nesting with PrefabSyncGroup.

Frequently Asked Questions about coherence-nested-prefabs

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

FAQPage Schema
How do I sync a nested CoherenceSync prefab in coherence?▼

Add Coherence.Toolkit.PrefabSyncGroup to the parent prefab's root and bake so the synced ids field enters the schema. It assigns deterministic ids to nested child CoherenceSyncs, sets them to NoDuplicates uniqueness, and collapses per-client copies onto one host-owned entity.

How do I detect nested networked prefabs in Unity prefab assets?▼

Scan prefab YAML for PrefabInstance blocks whose m_SourcePrefab guid resolves to another prefab containing a CoherenceSync MonoBehaviour. If the parent root lacks a PrefabSyncGroup, the nesting is unsynchronized.

Does PrefabSyncGroup handle runtime parenting of networked entities?▼

No. PrefabSyncGroup only covers edit-time nesting inside the prefab asset. Runtime parenting, such as picking up an item or mounting a vehicle, is handled by CoherenceNode and parent-child sync, which is a separate concern.

Why do duplicated entities appear when nesting CoherenceSync prefabs?▼

Each client instantiates its own copy of the nested child as a separate network entity because coherence has no edit-time record tying the copies together. PrefabSyncGroup records the nesting so NoDuplicates uniqueness collapses the copies onto the host's entity.

When should I de-nest prefabs instead of using PrefabSyncGroup?▼

De-nest when the child's lifetime and authority should be explicit and independent: make it a top-level prefab the host instantiates and reparents at runtime. Also fold the child into the parent's bindings if it only needs a few synced values.

What are the constraints of PrefabSyncGroup placement?▼

It requires a CoherenceSync component, disallows multiple instances, and must sit on the prefab root or OnValidate errors. Nested children 2 or more levels deep need a CoherenceNode, and scene-placed nested entities should use NoDuplicates uniqueness directly instead.