cocos-gray-screen-camera-canvas-fix
Use when Cocos Creator shows gray/blue screen on Play or Preview.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when Cocos Creator shows gray/blue screen on Play or Preview.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when installing Cocos Creator 3.x and setting up a headless test bootstrap.
Use when setting up a GUI-free CLI build pipeline for Cocos Creator 3.x.
Use when building code-driven scrollable UI panels in Cocos Creator 3.x.
Use when code-driven UI nodes in Cocos Creator 3.x fail to render text or colors.
Use when Cocos Creator 3.x CLI build fails with scene or library errors.
Use when installing Cocos Creator 3.x and debugging scene import errors.
| name | cocos-gray-screen-camera-canvas-fix |
| description | Use when Cocos Creator shows gray/blue screen on Play or Preview. |
Systematic debug for Cocos Creator gray/blue screen — covers Camera and Canvas configuration issues.
# 1. Check Camera._near in scene JSON
python3 -c "import json; d=json.load(open('assets/scenes/MainScene.scene')); c=[o for o in d if 'Camera' in str(o.get('_type',''))]; print([(o.get('_name'), o.get('_near')) for o in c])"
# 2. Check Canvas exists in Hierarchy (not just in JSON)
# Open Cocos Creator → Hierarchy panel → look for Canvas node
# 3. Check gfx-webgl2 is enabled
cat settings/engine.json | python3 -c "import sys,json; print(json.load(sys.stdin).get('gfx-webgl2'))"
If Canvas node exists in MainScene.scene JSON but is not visible in Editor Hierarchy:
See references/deep-diagnostics.md for comprehensive debugging.