t1k:cocos:playable:tooling-gotchas
| Field | Value |
|---|---|
| Module | playable |
| Version | 0.15.0 |
| Effort | low |
| Tools | — |
Keywords: cocos, gotcha, import, manage_asset, manage_prefab, MCP, meta, playable, prefab, script, uuid, write tool
How to invoke
Section titled “How to invoke”/t1k:cocos:playable:tooling-gotchasCocos Playable — Tooling Gotchas
Section titled “Cocos Playable — Tooling Gotchas”Known failure modes when using Cocos MCP tools and Claude Code’s Write tool to author scripts and scenes for playable ads. Each entry maps to a reference fragment with full evidence and the correct fix.
Gotcha Index
Section titled “Gotcha Index”| ID | Tool | Symptom | Reference |
|---|---|---|---|
| 1 | Cocos MCP | Scene/asset writes land in wrong repo | cocos-mcp-targets-open-project |
| 2 | Write tool | New script file not imported; @ccclass not registered | write-tool-files-not-imported |
| 3 | Prefab JSON | Need to bind a component with no editor / no MCP server | prefab-component-attach-by-hand |
Quick Decision Guide
Section titled “Quick Decision Guide”About to call an MCP scene/asset action (manage_scene, manage_node, manage_component, manage_asset)?
Call manage_project action=get_info first and confirm the open project matches the current repo.
About to create a new TypeScript script in a new subfolder?
Use manage_asset action=create url=db://assets/scripts/MyScript.ts — NOT the Write tool. The Write tool produces a file; the editor needs a managed import to generate .meta and register @ccclass.
About to bind a component to a prefab?
Use manage_prefab action=update — that is the normal path. Fall back to editing the prefab JSON by hand only when the editor is closed, the MCP server is unavailable, or the script has no .ts.meta uuid yet.