Skip to content

t1k:cocos:playable:tooling-gotchas

FieldValue
Moduleplayable
Version0.15.0
Effortlow
Tools

Keywords: cocos, gotcha, import, manage_asset, manage_prefab, MCP, meta, playable, prefab, script, uuid, write tool

/t1k: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.

IDToolSymptomReference
1Cocos MCPScene/asset writes land in wrong repococos-mcp-targets-open-project
2Write toolNew script file not imported; @ccclass not registeredwrite-tool-files-not-imported
3Prefab JSONNeed to bind a component with no editor / no MCP serverprefab-component-attach-by-hand

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.