Skip to content

t1k:cocos:playable:editor-tools

FieldValue
Moduleplayable
Version0.5.6
Efforthigh
Tools

Keywords: ads, cocos, ConfigWatcher, editor tools, extension, parameter JSON, playable

/t1k:cocos:playable:editor-tools

Editor Tools — ConfigWatcher & Package Manager Extension

Section titled “Editor Tools — ConfigWatcher & Package Manager Extension”

Two distinct editor tools: ConfigWatcher (auto-generates dashboard JSON) and package-manager extension (CPM registry UI). Also includes Cocos MCP Server (23 action tools for AI-assisted editor control). See also: t1k-cocos-playable-parameter (PlayableConfig that ConfigWatcher reads), t1k-cocos-playable-sdk-core.

ToolFilePurpose
ConfigWatcherassets/PlayableParamterTool/json-generate/ConfigWatcher.tsAuto-generates playable-config.json and parameter-assets.json
Package Managerextensions/package-manager/CPM registry UI — install/sync PlayableLabs packages
Cocos MCP Serverextensions/cocos-mcp-server/23 MCP tools for AI-assisted editor control
  • Editing files in ParameterToolBuild/ — they are overwritten by ConfigWatcher.
  • Calling require('fs') in non-editor scripts — crashes at runtime; always guard with if (!EDITOR) return.
  • Forgetting @executeInEditMode(true) on a component that needs editor-only behavior.
  • Package Manager extension source is TypeScript in source/ — compiled output is in dist/. Edit source, not dist.
  • SyncService uses fs-extra (not native fs) for ensureDir, copy, remove — ensure fs-extra is in the extension’s node_modules.
  • Editor.Message.request is async — always await it inside an async function.
  • Editor scripts run in a different process — cc.director is undefined — never share runtime singletons across editor/runtime.
  • Editor menu items are registered once at launch — code changes need an editor restart, not an editor reload.