game-asset-slot-handoff-cocos
Game Asset Slot Handoff — Cocos Creator mechanics
Section titled “Game Asset Slot Handoff — Cocos Creator mechanics”Extends rules/placeholder-first-handoff.md (theonekit-designer, not core), Cocos-only: parent = Asset Slot contract, this file = Cocos mechanism.
Load-bearing fact — UUID identity, not path identity
Section titled “Load-bearing fact — UUID identity, not path identity”Cocos keys an asset by the UUID in its .meta (a JSON sidecar, not Unity’s YAML) — never its path. Scenes and prefabs are plain JSON that resolve every component/asset reference through a compressed form of that UUID (__type__ / _componentId / __uuid__; mechanics + codec in t1k-cocos-base-uuid-verify). Overwrite in place → .meta untouched → refs survive. Add-then-delete, or letting the editor regenerate a missing .meta → new UUID → every reference silently resolves to a dangling/None entry. Same contract as the Unity sibling arm; the mechanism, not the conclusion, differs.
The web/H5 divergence — this kit’s sharpest departure from Unity
Section titled “The web/H5 divergence — this kit’s sharpest departure from Unity”This kit’s primary deliverable (playable) inlines everything at build time: mainBundleIsRemote: false, startSceneAssetBundle: false (t1k-cocos-playable-build-size). A slot’s asset compiles straight into the single output HTML — “the exact path” is simple, because nothing loads remotely and there is no CDN to resolve differently at runtime.
Non-playable Cocos builds do not have that luxury: Asset Bundle membership is a function of the containing folder, not the file (folderMap[targetFolder].bundle in t1k-cocos-base-asset-import’s manifest). A delivery landing one folder over — same filename, byte-identical content — silently joins a different bundle. On a bundle-mode project, the slot’s path field is load-bearing in a way it never is for a playable ad.
Delivery checklist (non-Cocos vendor)
Section titled “Delivery checklist (non-Cocos vendor)”- Overwrite exactly the slot-table files — same path/filename/extension, same containing folder.
- Never rename, add, or touch a
.meta. git diff --statbefore commit: only slot-table assets, zero.meta.- Commit, push.
Mechanics (.meta/import-settings detail, placeholder recipes per asset class, the bundle-vs-inline split, acceptance checklist, gaps): docs/game-asset-slot-handoff-cocos.md.
Related
Section titled “Related”rules/placeholder-first-handoff.md (theonekit-designer, parent) · game-asset-slot-handoff-unity.md (theonekit-unity, sibling arm) · docs/game-asset-slot-handoff-cocos.md