cocos_audit_scene_modules
Audit Cocos Creator scene components to detect disabled engine modules that cause runtime failures. Identifies mismatches between scene requirements and project configuration to prevent silent component failures.
Instructions
Cross-check scene components against the project's engine.json.
Catches the single highest-frequency "build succeeded, game broken at runtime" failure: using a component (RigidBody2D, Spine, VideoPlayer, ...) whose engine module is currently disabled. Build produces artifacts, the scene loads, but the components silently do nothing.
project_path=None → walks up from the scene file looking for
package.json. Pass explicitly when the scene lives outside the
project (prefab library, template copy).
Returns {ok, project_path, required, enabled, disabled, actions}. When ok=False, actions lists copy-pasteable next steps (cocos_set_engine_module calls + the library clean that module changes need).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| project_path | No |