Chat troubleshooting
Give Chat reproducible facts: the entry point, actions, expected result, actual result, and first error. These help distinguish context, code, asset, and runtime problems.
Chat cannot find a file
Provide a workspace-relative path such as assets/scripts/ClickGame.ts and ask Chat to list the files it actually found. Confirm that the open folder is the pink-game-demo root rather than its assets subfolder.
Generated code is incompatible with the engine
State the project's actual COCOS version and ask for a fix using its available APIs. Do not copy examples for another major engine version without checking compatibility.
The interface appears, but clicks and reset do nothing
The scene can display the complete interface without a working controller script. Check the Console for:
[ClickGame] Assign Score Label, Target, and Reset Button in the GameController Inspector before running the scene.On this error, ClickGame disables itself. Exit the preview and select GameController. Bind Score Label to the Label component at Canvas/ScoreCard/ScoreLabel, Target to Canvas/Target, and Reset Button to Canvas/ResetButton. Save and rerun. Do not ask Chat to bypass these references by creating another Canvas, buttons, or fallback interface.
If all references are valid, check event registration in onEnable(), cleanup in onDisable(), and scoring and reset methods. Include the actual actions and Console errors.
Changed text or positions do not appear in the preview
- Button text comes from
Canvas/ResetButton/Label; edit that Label and save the scene. - The script updates the score text. A scene-only change to
Score: 0is overwritten on startup or reset. - The target starts and resets at
TARGET_POSITIONS[0], then follows the array after clicks. Changing only its scene position does not change this route.
Give Chat the edited node path, properties, and files to identify what controls the runtime result.
Chat changes too much
Stop adding requirements. Ask Chat to list changed files and narrow the task to one outcome. Undo unrelated edits if needed, then send a prompt with explicit boundaries.
A command fails
Include the full command, working directory, exit code, and earliest error. The last log line is often only a summary.
The game runs but behaves incorrectly
Check each expected state: 0 points initially, 1 point and target movement after a click, and 0 points after reset. Report which state fails so Chat can inspect events, state updates, position order, or reset logic.
Limits of AI assistance
Chat cannot replace account permissions, platform review, signing certificates, or real-device tests. Developers must confirm the goal and impact of operations involving secrets, deletion, uploads, and publishing.