Cocos Creator 网页调试工具,运行时查看、修改节点树,实时更新节点属性,可视化显示缓存资源。
Cocos Creator 网页预览调试工具 — 实时查看节点树、修改属性、性能分析。
在 Cocos Creator 项目根目录下运行:
# 推荐: 通过 npx/bunx 始终使用最新版本
npx cccdev@latest init
# 或
bunx cccdev@latest init如需覆盖已有的 preview-template/:
npx cccdev@latest init --forceCLI 会自动检测 Cocos Creator 版本,将 devtools 模板安装到 preview-template/ 目录。刷新浏览器预览即可使用。
$ npx cccdev@latest init
检测到 Cocos Creator 3.x 项目
✓ 模板安装成功!
preview-template/
index.ejs
devtools/
assets/
index.js
style.css
刷新浏览器预览即可使用 devtools。Usage: cccdev [options]
Commands:
init 安装 devtools 预览模板到 Cocos Creator 项目
Options:
--help, -h 显示帮助
--version 显示版本号
--force 覆盖已存在的 preview-templateccc-devtools/
├── bin/cccdev.ts # CLI 入口
├── src/
│ ├── cli.ts # 命令路由
│ ├── commands/init.ts # cccdev init 实现
│ └── utils/ # detect, logger
├── template/ # 构建产物 (gitignored, 发布时打入包)
│ └── 3x/
├── packages/
│ └── cccdev-template-3x/ # CC 3.x 模板源码 (private, 不发布)
│ ├── src/ # Preact 源码
│ ├── template/ # vite 构建输出
│ └── vite.config.ts # IIFE 构建配置cd packages/cccdev-template-3x && bun install| 命令 | 说明 |
|---|---|
bun run build |
构建模板并复制到 template/3x/ |
bun run type-check |
TypeScript 类型检查(根目录 CLI 代码) |
bun run lint |
oxlint 代码检查 |
bun run lint:fix |
oxlint 自动修复 |
bun run fmt |
oxfmt 格式化代码 |
bun run fmt:check |
oxfmt 检查格式(不写入) |
在 Cocos Creator 项目中使用本地开发版本:
cd /path/to/cocos-project
bun run /path/to/ccc-devtools/bin/cccdev.ts initbun run build
npm publishMIT
暂无开放 Issues,或尚未同步最近议题。