chore: freeze v1.1.3 filing submission build (60 levels, full-screen safe layout)
This commit is contained in:
commit
96c19dca82
174 files changed
+37935
No files matched your search
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"skillId": "cocos-mcp-workflow",
|
||||
"skillName": "funplay-cocos-mcp-workflow",
|
||||
"templateVersion": 4,
|
||||
"templateHash": "80d0dda747fe5ed422d851db7b550af6802bfe61289f915a4ff1b95b2c059f5a",
|
||||
"installedHash": "80d0dda747fe5ed422d851db7b550af6802bfe61289f915a4ff1b95b2c059f5a",
|
||||
"files": {
|
||||
"SKILL.md": {
|
||||
"templateHash": "80d0dda747fe5ed422d851db7b550af6802bfe61289f915a4ff1b95b2c059f5a",
|
||||
"installedHash": "80d0dda747fe5ed422d851db7b550af6802bfe61289f915a4ff1b95b2c059f5a"
|
||||
},
|
||||
"references/project-readiness.md": {
|
||||
"templateHash": "e5fb0ffc4320f6b108cc0f852124b7dd3f6f0acadd9c5d552a3f58f8ddf3b141",
|
||||
"installedHash": "e5fb0ffc4320f6b108cc0f852124b7dd3f6f0acadd9c5d552a3f58f8ddf3b141"
|
||||
},
|
||||
"references/project-identity-and-input.md": {
|
||||
"templateHash": "5d2e1490645031a8fe16fb43526f3749002b723c45b656f1ea4925c1ec5d6daa",
|
||||
"installedHash": "5d2e1490645031a8fe16fb43526f3749002b723c45b656f1ea4925c1ec5d6daa"
|
||||
}
|
||||
},
|
||||
"extensionVersion": "0.7.6",
|
||||
"updatedAt": "2026-11-23T08:36:02.340Z"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
name: funplay-cocos-mcp-workflow
|
||||
description: "Edit, inspect, validate, preview, and debug Cocos Creator projects through Funplay Cocos MCP. Use when working with scenes, nodes, prefabs, assets, TypeScript, logs, screenshots, preview behavior, runtime state, or MCP connectivity."
|
||||
---
|
||||
|
||||
# Funplay Cocos MCP Workflow
|
||||
|
||||
## Instructions
|
||||
|
||||
## Operating Loop
|
||||
|
||||
1. Establish context.
|
||||
- Before writes, independently match the intended project to initialize.funplay.context; do not adopt whichever server answered. For old endpoints, reconnects, or frame-paced gestures, read [project identity and input](references/project-identity-and-input.md).
|
||||
- Read `cocos://project/context` or call `get_editor_state` before assuming the project, active scene, MCP URL, selection, visible windows, or tool profile.
|
||||
- Inspect the active scene with `get_scene_info` and `get_hierarchy`; use `get_selection`, `list_scenes`, `list_assets`, or `list_prefabs` when identity or ownership is unclear.
|
||||
- Treat user-provided node and asset names as hints. Resolve the real hierarchy path, node UUID, asset UUID, or `db://assets/...` URL before editing.
|
||||
- Call `get_tool_catalog` when a required tool may be hidden by the `core`, `full`, or custom exposure profile.
|
||||
2. Choose the edit surface.
|
||||
- Edit TypeScript and ordinary project files with repository tools or the MCP file tools, then refresh the affected asset and run diagnostics.
|
||||
- Edit live scene nodes with focused scene/component tools or `execute_javascript` using `context="scene"`; save the scene when the change must persist.
|
||||
- Use `execute_javascript` with `context="editor"` for asset-db, Editor messages, project orchestration, and filesystem work that belongs in the editor process.
|
||||
- Inspect prefab ownership and references before mutation. Prefer focused prefab tools, or edit a verified linked instance and apply it back through the editor workflow.
|
||||
- Preserve an existing UI or gameplay prefab hierarchy and change only the necessary nodes, components, and serialized fields; do not rebuild the entire prefab unless explicitly requested.
|
||||
3. Execute the smallest coherent change.
|
||||
- Prefer one guarded `execute_javascript` operation for tightly related editor work, but use focused tools when they provide clearer validation or safer arguments.
|
||||
- Keep JavaScript safety checks enabled unless the code and its paths were reviewed explicitly.
|
||||
- Null-check every scene, node, component, asset, and filesystem lookup. Return concise structured before/after values, including stable UUIDs or asset URLs where useful.
|
||||
- Save or refresh only the assets and scenes intentionally changed.
|
||||
- Do not guess alternate paths, silently create replacement objects, or run self-healing fallback loops after a missing reference or unsupported editor message.
|
||||
4. Read back and validate.
|
||||
- Re-inspect the exact node, component, prefab instance, or asset after mutation; a successful command response alone is not proof of the final editor state.
|
||||
- Run `run_script_diagnostics` or `get_script_diagnostic_context` after TypeScript changes, then use `validate_scene` and project logs before claiming success.
|
||||
- For visual or runtime work, run the appropriate browser, Game View, or simulator preview and verify with runtime state, input, logs, and screenshots.
|
||||
- State exactly what was verified and what still requires a native build, device, network, store, or manual check.
|
||||
|
||||
## Scene, Prefab, and Asset Safety
|
||||
|
||||
- Do not treat Cocos `.scene`, `.prefab`, or `.meta` files as ordinary text. Prefer scene-process, prefab, and asset-db operations that preserve UUID references and editor import state.
|
||||
- If `edit_prefab_json` is used, target a verified prefab path and the smallest exact JSON path or literal replacement, then run `validate_prefab_references` and inspect the result.
|
||||
- Before structural prefab work, call `inspect_prefab`; for scene instances, call `inspect_prefab_instance` and choose deliberately between apply and revert.
|
||||
- Replacing a prefab at the same path can keep the asset UUID while changing internal object IDs and breaking serialized references, animation tracks, nested prefab links, and scene overrides.
|
||||
- Inspect dependencies with `inspect_asset_dependencies` and validate them with `validate_asset_dependencies` before and after sensitive asset changes.
|
||||
- Never copy a `.meta` file when duplicating an asset. Use `duplicate_prefab` or asset-db operations so the new asset receives its own UUID.
|
||||
|
||||
## Tool Exposure and Execution Contexts
|
||||
|
||||
- The default `core` profile exposes the main inspection, diagnostics, logs, screenshots, scene, asset, and unified JavaScript workflow.
|
||||
- The `full` profile adds focused mutation tools for nodes, components, prefabs, UI, runtime control, input simulation, files, and project preview.
|
||||
- If a named tool is unavailable under a custom profile, adapt to the exposed catalog and report the missing capability instead of pretending it ran.
|
||||
- In scene context, use the Cocos runtime and scene APIs for live hierarchy and component work. In editor context, use `Editor` APIs and messages for asset-db and extension orchestration.
|
||||
- Use `execute_scene_script` and `execute_editor_script` only as compatibility entrypoints; prefer `execute_javascript` with an explicit context for new workflows.
|
||||
|
||||
## Readiness and Preview Evidence
|
||||
|
||||
- For imports, scripts, preview startup, calibrated input, or persistence checks, read [project readiness](references/project-readiness.md). Do not load this conditional reference for an unrelated inspection.
|
||||
- `check_asset_ready` checks stable AssetDB identity, not script compilation or runtime loading. Discover its exposure before use.
|
||||
- `get_runtime_state` describes the editor Game View and toolbar, not browser/simulator runtime or edit-scene counters.
|
||||
- Read `get_recent_logs` or `search_project_logs` for relevant errors. Do not clear persistent logs without explicit confirmation.
|
||||
|
||||
## Failure Handling
|
||||
|
||||
- If MCP is unreachable, limit claims to safe filesystem inspection or code edits; do not claim scene, prefab, editor, preview, or runtime verification.
|
||||
- If a node lookup is ambiguous, return the matching paths and UUIDs and choose only after identifying the user-visible or prefab-owned target.
|
||||
- If editor readback and serialized text disagree, trust editor and asset-db readback first and investigate whether the wrong asset, scene instance, or stale import was inspected.
|
||||
- Fix diagnostics or new error logs caused by the change before visual or runtime validation.
|
||||
@@ -0,0 +1,21 @@
|
||||
# Project identity and frame-paced input
|
||||
|
||||
## Before editing through MCP
|
||||
|
||||
Generated connections use /mcp/project/<project-id>/ on the existing project port. Independently compare initialize.funplay.context.project_path and project_id to the user's intended project. Context metadata identifies an extension/Editor lifetime, not authentication or permission to edit another project.
|
||||
|
||||
Legacy / and /mcp addresses still support initialization and exposed read-only tools. Mutating tools require expected_context from that verified initialization, either as a tool argument or params._meta.expected_context. A project-scoped URL binds the project; an explicit expected_context also pins the extension/Editor instance. Missing, wrong-project, conflicting or stale pins execute nothing. Never automatically fetch a token from an arbitrary responding server just to bypass a rejection.
|
||||
|
||||
Prefer reconfiguration from MCP Server's existing connection/Skills notice, then reconnect or restart the client. Existing user edits remain protected. Unreadable client files need review; unrelated entries and historical shared entries are not silently deleted. A reload can invalidate the instance pin and calibrated screenshots even while the port remains the same. Read fresh identity and capture again; never replay a mutation solely to get a cleaner reply.
|
||||
|
||||
## Frame-paced mouse drag (Full profile)
|
||||
|
||||
Use this only when a drag test is requested and the originating input tool is exposed. Keep legacy timing for existing steps/stepDelayMs callers. For a new frame-paced gesture, capture the exact target, use coordinateSpace=image-pixels with its captureId, and choose a unique requestKey. Set timing=frame-paced and supply startX/startY/endX/endY from that PNG. durationMs is 50..10000 (default 600); pressHoldMs and endHoldMs are 0..2000 (default 100). Each edge still gets separate renderer frames at zero hold. Do not mix legacy step timing with these fields.
|
||||
|
||||
The tool waits up to waitMs (default 1200), then may return a running receipt. Read it through the SAME tool with action=status and jobId or requestKey; cancel through action=cancel without coordinates. A retained identical start recovers its original receipt and never dispatches the gesture again. Changed arguments conflict. Only the latest 32 receipts are retained; these are not durable transactions across eviction/reload. A missing receipt requires inspection of the resulting state, not an automatic retry with a new key. The preview wrapper and direct mouse-drag tool have separate ownership; do not change custom exposure lists to access another tool's receipts.
|
||||
|
||||
Frame-paced input observes the captured Electron renderer's requestAnimationFrame callbacks. Native Game View pause/stop state is checked separately; renderer progression does not prove that native game Update advanced or a game accepted the gesture. Receipts deliberately report nativeGameUpdateVerified=false and businessOutcomeVerified=false. Compare authored state, actual preview/game state and fresh screenshots independently. This is mouse input, not touch injection or proof of physical-device provenance.
|
||||
|
||||
Focus loss, stale geometry, stalled frames, cancellation, preview pause/stop and extension shutdown interrupt the job. Only its own mouse release is attempted, without business callbacks or a legacy fallback. Cleanup failure leaves the target window locked; explicitly cancel that job to retry cleanup. Status reads never send input. No background/focus policy, preview pause state, project input setting or dependency is automatically changed.
|
||||
|
||||
Sources: [MCP transport](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), [Electron input](https://www.electronjs.org/docs/latest/api/web-contents#contentssendinputeventinputevent) and [Creator Director](https://docs.cocos.com/creator/3.8/api/en/class/Director).
|
||||
@@ -0,0 +1,26 @@
|
||||
# Project, import, and preview readiness
|
||||
|
||||
## Asset and script changes
|
||||
|
||||
- Resolve the exact AssetDB UUID or db:// URL. Refresh only the changed source assets; do not guess an extension or silently substitute another asset.
|
||||
- Import is asynchronous. If exposed, use `check_asset_ready` with the exact target after refresh/import and before assigning the asset or attaching its script. A stable imported UUID/URL identity is not proof that the importer queue is empty, TypeScript compiled, or the preview loaded those bytes.
|
||||
- `check_asset_ready` is a Full-profile read-only tool. Discover exposure with `get_tool_catalog`; do not change a custom allowlist without authorization. If unavailable, query exact asset info and report the narrower evidence instead of claiming full readiness.
|
||||
- After TypeScript edits, run `run_script_diagnostics` and inspect import/preview errors. Its no-emit compiler result is separate from Creator's compilation and preview loading.
|
||||
- A zero-wait readiness query is one observation, not stable readiness. Busy, missing, importing, timeout, unavailable, and unknown results are not success. Wait within a bounded budget or report the unresolved state; never repeat a mutation to obtain a cleaner response.
|
||||
- Check APIs against the actual Creator version and loaded project components, not only a package.json declaration. Preserve existing dependencies and project conventions.
|
||||
|
||||
## Preview evidence
|
||||
|
||||
- Query `get_preview_mode` before choosing browser, editor Game View, or simulator. Browser `localUrl` is same-host; `networkUrl` is Creator's LAN address.
|
||||
- `get_runtime_state`, pause, and resume address the editor Game View and its native toolbar. They do not inspect external browser/simulator runtime state. Edit-scene director counters and time scale are not Game View state.
|
||||
- A listening MCP server, opened window, non-empty screenshot, current scene drawing, and correct business behavior are different claims. Verify only the layers relevant to the user's request and identify missing evidence.
|
||||
- Use `capture_scene_screenshot` for editor Scene composition and Game/preview capture for game output. For real pointer testing, bind `simulate_mouse_click` or drag to the returned `captureId` with `coordinateSpace="image-pixels"`; use coordinates from that exact image.
|
||||
- Recapture after a resize, zoom, reload, scene change, or stale-capture rejection. Do not scale coordinates from an unrelated/resized reference image yourself. Button event emission tests handlers but does not prove hit testing, clipping, focus, or occlusion.
|
||||
- If an input reports an unknown outcome, inspect the resulting state before deciding on another action. Do not automatically resend it. Restore only temporary state owned by this task; preserve user changes.
|
||||
|
||||
## Persistence
|
||||
|
||||
- Prefer scene-process, prefab, and AssetDB tools for .scene/.prefab/.meta changes. A successful native message alone does not prove saved content or preserved UUID links.
|
||||
- Reinspect the exact object and relevant serialized references, save only the requested changes, and reopen when persistence matters. Keep incomplete checks explicit.
|
||||
|
||||
Sources: [Creator messages](https://docs.cocos.com/creator/3.8/manual/en/editor/extension/messages.html) and [asset workflow](https://docs.cocos.com/creator/3.8/manual/en/asset/asset-workflow.html).
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"skillId": "cocos-ui-composition",
|
||||
"skillName": "funplay-cocos-ui-composition",
|
||||
"templateVersion": 5,
|
||||
"templateHash": "509e34ddc0bd9b96f6003884855ef39f57f078c87e0d29c7259ed03873bcb30f",
|
||||
"installedHash": "509e34ddc0bd9b96f6003884855ef39f57f078c87e0d29c7259ed03873bcb30f",
|
||||
"files": {
|
||||
"SKILL.md": {
|
||||
"templateHash": "509e34ddc0bd9b96f6003884855ef39f57f078c87e0d29c7259ed03873bcb30f",
|
||||
"installedHash": "509e34ddc0bd9b96f6003884855ef39f57f078c87e0d29c7259ed03873bcb30f"
|
||||
},
|
||||
"references/layout-and-adaptation.md": {
|
||||
"templateHash": "04eab714246a80077e87a9be525a1be3bfb1b365a9d167bb1f55a9068bb87257",
|
||||
"installedHash": "04eab714246a80077e87a9be525a1be3bfb1b365a9d167bb1f55a9068bb87257"
|
||||
},
|
||||
"references/sprites-and-importers.md": {
|
||||
"templateHash": "466062877f01b84895294f36c65176b968cd247c10f55c7eaf253509229863c3",
|
||||
"installedHash": "466062877f01b84895294f36c65176b968cd247c10f55c7eaf253509229863c3"
|
||||
},
|
||||
"references/text-and-localization.md": {
|
||||
"templateHash": "519c280dcc5bc868e87b142298fa6bc95e19e613497627f6ef6461e7805ccbb4",
|
||||
"installedHash": "519c280dcc5bc868e87b142298fa6bc95e19e613497627f6ef6461e7805ccbb4"
|
||||
},
|
||||
"references/input-and-validation.md": {
|
||||
"templateHash": "ebf57c3620b7a812ad3e102e4be4f9d87883312eb3c68bde2825c066174361cc",
|
||||
"installedHash": "ebf57c3620b7a812ad3e102e4be4f9d87883312eb3c68bde2825c066174361cc"
|
||||
},
|
||||
"references/image-to-prefab.md": {
|
||||
"templateHash": "650004f2f1e3bfcd33ef6ea346d03ced76a1b25287afbe9f0d5502fb0b87204f",
|
||||
"installedHash": "650004f2f1e3bfcd33ef6ea346d03ced76a1b25287afbe9f0d5502fb0b87204f"
|
||||
},
|
||||
"references/project-identity-and-input.md": {
|
||||
"templateHash": "5d2e1490645031a8fe16fb43526f3749002b723c45b656f1ea4925c1ec5d6daa",
|
||||
"installedHash": "5d2e1490645031a8fe16fb43526f3749002b723c45b656f1ea4925c1ec5d6daa"
|
||||
}
|
||||
},
|
||||
"extensionVersion": "0.7.6",
|
||||
"updatedAt": "2026-11-23T08:36:02.348Z"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: funplay-cocos-ui-composition
|
||||
description: "Build and revise responsive Cocos Creator UI, and turn full-page design images into editable prefabs with reusable sprites, layout adaptation, and visual fidelity checks. Use for Canvas layout, prefabs, scrolling, text, input, and UI validation."
|
||||
---
|
||||
|
||||
# Funplay Cocos UI Composition
|
||||
|
||||
## Instructions
|
||||
|
||||
For MCP writes, reconnects, or interactive drag tests, read [project identity and input](references/project-identity-and-input.md). Renderer frames are not native Game View engine updates or gameplay acceptance.
|
||||
|
||||
## UI Workflow
|
||||
|
||||
1. Inspect the active scene, Canvas, design resolution, target viewports, `UITransform`, `Widget`, `Layout`, existing `SafeArea` policy, prefab ownership and serialized references.
|
||||
2. Preserve the user's design requirements and established project baseline. A full-page reference may define a new screen's baseline; clarify cropped or conflicting references instead of imposing a fixed resolution.
|
||||
3. Preserve existing roots, node/component identities, event bindings, animation targets and nested prefabs. Change only what the request requires; do not rebuild the entire prefab unless explicitly requested.
|
||||
4. Choose one owner for each position/size property. Avoid conflicting Widget, Layout, animation and manual writes. Use supported Cocos scene/prefab/AssetDB workflows for authored assets.
|
||||
5. Read back exact dimensions, anchors, constraints, SpriteFrame/font references and event bindings. Save/reopen when persistence matters; use preview input and screenshots for visual or interaction claims.
|
||||
|
||||
## Design Fidelity
|
||||
|
||||
- Preserve authored spacing and the project's adaptation. Do not proactively add SafeArea containers, adaptation scripts or extra insets. New adaptation requires an explicit request or a demonstrated overlap confirmed with the user.
|
||||
- Keep complete UI pages in saved prefabs when that fits the project; runtime hierarchy creation is not a substitute for requested authored UI.
|
||||
- A tool response, hierarchy, edit-scene performance counter and screenshot prove different things. Report unverified runtime, device, glyph or business behavior explicitly.
|
||||
|
||||
## Read Only the Relevant References
|
||||
|
||||
- For a complete design image or screenshot to editable UI, including asset splitting, shared controls, and fidelity acceptance, start with [image to prefab](references/image-to-prefab.md).
|
||||
- For resolution, orientation, SafeArea, Widget/Layout, scrolling or masks: [layout and adaptation](references/layout-and-adaptation.md).
|
||||
- For SpriteFrames, nine-slice, atlas or importer edits: [sprites and importers](references/sprites-and-importers.md).
|
||||
- For fonts, text overflow, glyph coverage or requested localization: [text and localization](references/text-and-localization.md).
|
||||
- For event bindings, real input, animation, screenshots or performance evidence: [input and validation](references/input-and-validation.md).
|
||||
|
||||
These references are conditional; do not load every file for a focused edit.
|
||||
@@ -0,0 +1,36 @@
|
||||
# From a full UI image to an editable Cocos prefab
|
||||
|
||||
Use this workflow for a new page or a set of switchable pages drawn in a user design. Work with the project's reusable artwork and the user's own designs and assets. For a third-party inspiration reference, create original visuals for the new UI.
|
||||
|
||||
## When image generation helps
|
||||
|
||||
Image generation is optional. Cocos MCP handles asset import, prefab composition, and preview verification. Any image generation or editing comes from a tool available in the AI client or the project's art pipeline.
|
||||
|
||||
- For a layered design, reuse its exported assets. For a flattened image, reuse clean cuts from visible regions and build text, dividers, and simple surfaces with native UI components. The reference can be analyzed by an image-capable client or described in a supplied component map.
|
||||
- If a complex background or icon is missing, or a UI element hides part of the background, use an available image generation or editing tool to produce just the missing asset. Specify its intended dimensions, silhouette, style, and transparency or bleed. Inspect the output at its intended size and mark generated artwork as an approximation until it passes the visual comparison.
|
||||
- With no generation tool, proceed with reusable assets and the layout that can be verified. If missing artwork blocks fidelity acceptance, request the corresponding clean background, transparent sprite, or layered design. Record any placeholder and the affected regions in the review.
|
||||
|
||||
## Lock the design and map the parts
|
||||
|
||||
- Keep each reference at its original pixel dimensions. Identify the game viewport, the selected page/tab, the locale, visible counter values, list scroll position, and relevant control states. Keep the reference and state record for comparison after implementation. If supplied pages disagree on a shared control, resolve the intended variant and record each deliberate departure from the references.
|
||||
- Use the existing Canvas policy in an established project. On a new page without a baseline, use the intended full viewport as the design basis. Map part bounds in top-left reference pixels, node paths, stacking order, anchors, and fixed or flexible edges. Distinguish visible artwork bounds from the control's layout box and hit area.
|
||||
- Record the chosen source for each part. Inspect cutouts, including their alpha edges and original padding, against the background they will actually use.
|
||||
|
||||
## Build the saved UI
|
||||
|
||||
- Keep the full reference image outside the rendered hierarchy. Import only the separately reusable art and use real SpriteFrames. Separate the background, title, button surfaces, icons, labels, badges, progress track/fill, and state overlays so each can move or change independently. Give text, dynamic values, and localization native text components. Reserve graphical lettering for artwork meant to stay fixed.
|
||||
- Share a navigation prefab or shell across related pages. Keep each tab's icon and caption separate from the normal and selected backgrounds and divider lines. Derive the highlight, tab widths, divider positions, label placement, and hit areas from the selected state and available width. Use nine-slice for stretchable surfaces with fixed corners. Keep icon proportions and intentional blank margins.
|
||||
- Author repeated lists as reusable rows in a ScrollView with a clipped viewport and Layout-managed content. Give each row separate art, text, and button bindings. Bind callbacks inside standalone prefab boundaries and use the project's normal events or controller bindings to connect them to a shell.
|
||||
- Save the UI under the existing Canvas with UI_2D layers. Use native prefab serialization, verify exact imported references, and confirm that assets survive reload or fresh instantiation. Consult [sprites and importers](sprites-and-importers.md) for trim/insets and [text and localization](text-and-localization.md) for font behavior. If an icon appears too large, check the imported trim and padding first. If a label clips, apply the font and overflow policy before setting the final box, then inspect the glyph baseline in preview.
|
||||
- Adapt regions independently. Use anchors for pinned controls, let the list viewport consume the remaining space, and crop flexible background art while preserving its aspect ratio. Keep a single owner for each driven dimension. Use [layout and adaptation](layout-and-adaptation.md) for the project's resize and safe-area policy.
|
||||
|
||||
## Verify fidelity in the actual preview
|
||||
|
||||
1. Capture the saved scene or prefab instance in the target Cocos preview. For fidelity, use a raw PNG of the same game viewport size and state as the reference. Check visible landmarks, the crop and the canvas size. Equal PNG dimensions alone can still conceal a cropped or zoomed capture.
|
||||
2. Compare at the same pixel coordinates. Review the whole page, then zoom into the mapped regions for icon silhouettes, alignment, text baselines, borders, shadow/alpha edges, and clipping. Use a side-by-side view and, when available, a same-scale overlay, wipe, or difference heatmap. Avoid shifting or stretching individual regions during comparison.
|
||||
3. Check node geometry and rendered appearance separately. Use runtime bounds projected into capture pixels for geometry. Use the visible pixels for glyphs, strokes, and artwork. Region color error, structural similarity, and tolerant edge overlap can help locate differences. Choose tolerances for the project before accepting results, and review each required region so a large matching background cannot hide a small control defect.
|
||||
4. Fix the source of each difference and recapture under the same conditions. A flat 1 px stroke may require a filled border or different pixel alignment. A matching node box can still contain the wrong sprite or state. Preserve the original design, captures, per-region results, and any approved variations for review.
|
||||
5. Check adaptation at the requested narrow and wide viewports with real pointer input. Exercise the in-scope page changes, button states, value updates, list scrolling and clipping using [input and validation](input-and-validation.md). Report the fidelity result for the baseline size and the adaptation/input results for the tested sizes. State any remaining mismatches or untested conditions.
|
||||
|
||||
For example, a shared bottom bar can have separate mapped regions for five icon silhouettes, the selected surface, a thin divider, and the full bar. At the reference size, check these independently. On a wider viewport, check that the highlight and lines follow the slots and that the same tabs respond to clicks. This catches trim and resize problems even when the page looks close in a thumbnail.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Input, animation, and visual verification
|
||||
|
||||
- Verify Button/Toggle/Slider/EditBox target nodes, serialized component/handler/custom data, disabled state, hit area and focus behavior. Bind once; don't make duplicate listeners to compensate for an unresolved reference.
|
||||
- Emitting Button click events checks callbacks, not real pointer dispatch. For hit testing use the actual Game View/preview and calibrated screenshot coordinates; verify the resulting state or screenshot rather than treating event delivery as the business outcome.
|
||||
- Screenshot `captureId` identifies one image and its observed geometry. Use `coordinateSpace="image-pixels"` with coordinates in that exact PNG. Calibration maps to Electron content coordinates and rejects stale or changed targets. It does not identify a Button or prove absence of occlusion.
|
||||
- Keep UIOpacity, active state, Button interactability and BlockInputEvents consistent. A transparent modal may still block input; a visible scrim may not block anything. Check sibling order, masks and hidden states in preview.
|
||||
- Animate a Visual/Container child when Widget or Layout owns the root. Cancel/reconcile prior tweens, and verify deterministic position, scale, opacity, active state and close/reopen behavior. Use an explicit UI clock only if menus must animate during gameplay pause.
|
||||
- Test only requested interactions. An input with unknown delivery/outcome must be followed by readback, not automatic replay. Restore temporary preview state only if still owned by this task.
|
||||
- Use `validate_scene`, exact component/reference readback and screenshots as complementary evidence. A complete hierarchy or non-empty image does not prove correct layout, visible text, hit testing or business behavior.
|
||||
- `get_performance_snapshot` reports edit-scene node/component/UI/depth/memory counters, not browser/Game View draw calls or GPU performance. Use actual runtime/platform measurements before making performance claims.
|
||||
- Choose representative aspect ratios and locales for the target project. Record which checks passed, failed, were incomplete or require a device; avoid claiming universal validation from one screenshot.
|
||||
|
||||
Sources: [UI system](https://docs.cocos.com/creator/3.8/manual/en/2d-object/ui-system/) and [node hierarchy](https://docs.cocos.com/creator/3.8/manual/en/concepts/scene/node-tree.html).
|
||||
@@ -0,0 +1,24 @@
|
||||
# Layout and design fidelity
|
||||
|
||||
## Resolution and safe area
|
||||
|
||||
- User requirements and explicit design specifications take priority. Preserve an established project's design resolution and Fit Width/Fit Height policy unless a change is requested. For a new screen without a baseline, a full-page design image may define the baseline; a crop, conflicting images, or unclear intended dimensions need clarification. Do not impose a fixed phone resolution.
|
||||
- Keep authored spacing and full-bleed composition. Inspect existing SafeArea components and runtime adaptation before changing them. Do not proactively add SafeArea containers, adaptation scripts, extra margins, or a second inset; new adaptation needs an explicit request or a demonstrated overlap confirmed with the user.
|
||||
- If safe-area adaptation is requested, distinguish full-bleed art from critical controls and apply it once. Cocos SafeArea uses sys.getSafeAreaRect and Widget; preserve the project's existing ownership of position/size.
|
||||
- Separate Canvas adaptation from gameplay camera composition. Correct Widget constraints do not prove that the world camera shows the desired area.
|
||||
|
||||
## Property ownership
|
||||
|
||||
- UITransform owns contentSize and anchor point. Keep ordinary layout scale at one; change dimensions or constraints rather than stretching transforms to approximate a design.
|
||||
- Widget owns selected edges/centers and may overwrite position or size. Choose ONCE, ON_WINDOW_RESIZE, or ALWAYS from actual behavior; do not animate a property continuously rewritten by Widget.
|
||||
- Layout drives children or container according to ResizeMode. Putting Layout and Widget on the same node can create competing ownership. Read back driven sizes after layout settles; call updateLayout only when same-frame measurement is required.
|
||||
- Verify grid cell/constraint policy, padding, spacing, axis and growth direction. Keep nested layout chains shallow and batch repeated content changes.
|
||||
- Responsive region patterns are options, not permission to reorganize existing prefabs. Reposition only the regions needed by the requested aspect-ratio change; retain roots, identities, references and animation tracks.
|
||||
|
||||
## Scrolling and clipping
|
||||
|
||||
- Use a ScrollView root, masked view and content node. Verify the actual content reference, enabled axes, inertia/brake/bounce, child-button cancellation and nested scrolling.
|
||||
- Respect Mask renderer constraints and clipping boundaries. Do not add Sprite/Label renderers to a Mask node where its renderer is owned by the mask implementation.
|
||||
- Pool large repeated lists. Test first/last items, resize, overflow and dynamic content in preview; dimensions alone do not prove visibility or input.
|
||||
|
||||
Sources: [Widget](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/editor/widget.html), [Layout](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/editor/layout.html), [SafeArea](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/editor/safearea.html), [multi-resolution adaptation](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/engine/multi-resolution.html).
|
||||
@@ -0,0 +1,21 @@
|
||||
# Project identity and frame-paced input
|
||||
|
||||
## Before editing through MCP
|
||||
|
||||
Generated connections use /mcp/project/<project-id>/ on the existing project port. Independently compare initialize.funplay.context.project_path and project_id to the user's intended project. Context metadata identifies an extension/Editor lifetime, not authentication or permission to edit another project.
|
||||
|
||||
Legacy / and /mcp addresses still support initialization and exposed read-only tools. Mutating tools require expected_context from that verified initialization, either as a tool argument or params._meta.expected_context. A project-scoped URL binds the project; an explicit expected_context also pins the extension/Editor instance. Missing, wrong-project, conflicting or stale pins execute nothing. Never automatically fetch a token from an arbitrary responding server just to bypass a rejection.
|
||||
|
||||
Prefer reconfiguration from MCP Server's existing connection/Skills notice, then reconnect or restart the client. Existing user edits remain protected. Unreadable client files need review; unrelated entries and historical shared entries are not silently deleted. A reload can invalidate the instance pin and calibrated screenshots even while the port remains the same. Read fresh identity and capture again; never replay a mutation solely to get a cleaner reply.
|
||||
|
||||
## Frame-paced mouse drag (Full profile)
|
||||
|
||||
Use this only when a drag test is requested and the originating input tool is exposed. Keep legacy timing for existing steps/stepDelayMs callers. For a new frame-paced gesture, capture the exact target, use coordinateSpace=image-pixels with its captureId, and choose a unique requestKey. Set timing=frame-paced and supply startX/startY/endX/endY from that PNG. durationMs is 50..10000 (default 600); pressHoldMs and endHoldMs are 0..2000 (default 100). Each edge still gets separate renderer frames at zero hold. Do not mix legacy step timing with these fields.
|
||||
|
||||
The tool waits up to waitMs (default 1200), then may return a running receipt. Read it through the SAME tool with action=status and jobId or requestKey; cancel through action=cancel without coordinates. A retained identical start recovers its original receipt and never dispatches the gesture again. Changed arguments conflict. Only the latest 32 receipts are retained; these are not durable transactions across eviction/reload. A missing receipt requires inspection of the resulting state, not an automatic retry with a new key. The preview wrapper and direct mouse-drag tool have separate ownership; do not change custom exposure lists to access another tool's receipts.
|
||||
|
||||
Frame-paced input observes the captured Electron renderer's requestAnimationFrame callbacks. Native Game View pause/stop state is checked separately; renderer progression does not prove that native game Update advanced or a game accepted the gesture. Receipts deliberately report nativeGameUpdateVerified=false and businessOutcomeVerified=false. Compare authored state, actual preview/game state and fresh screenshots independently. This is mouse input, not touch injection or proof of physical-device provenance.
|
||||
|
||||
Focus loss, stale geometry, stalled frames, cancellation, preview pause/stop and extension shutdown interrupt the job. Only its own mouse release is attempted, without business callbacks or a legacy fallback. Cleanup failure leaves the target window locked; explicitly cancel that job to retry cleanup. Status reads never send input. No background/focus policy, preview pause state, project input setting or dependency is automatically changed.
|
||||
|
||||
Sources: [MCP transport](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), [Electron input](https://www.electronjs.org/docs/latest/api/web-contents#contentssendinputeventinputevent) and [Creator Director](https://docs.cocos.com/creator/3.8/api/en/class/Director).
|
||||
@@ -0,0 +1,11 @@
|
||||
# SpriteFrames, nine-slice, and importer edits
|
||||
|
||||
- Resolve the source image, its .meta ownership and exact SpriteFrame subasset UUID before assignment or importer edits. Texture, ImageAsset and SpriteFrame are different asset types; never fabricate a subasset UUID.
|
||||
- Inspect source dimensions, rect/trim/rotation, cap insets, Sprite type, sizeMode and UITransform dimensions. Set CUSTOM sizeMode before assigning a SpriteFrame when authored dimensions must remain fixed, then read back the final size after assignment.
|
||||
- For sliced borders, retain source-coordinate insets and surviving SpriteFrame identities. Check that left+right and top+bottom fit the source rect and that corners/borders remain intact at the intended sizes. Do not derive importer coordinates from a downscaled screenshot.
|
||||
- Use focused importer/AssetDB operations when available. If a narrowly scoped .meta edit is necessary, preserve unrelated importer settings, UUIDs, submeta mappings and atlas references, refresh the exact source, and verify imported state. Do not recreate metadata or copy a .meta file to duplicate an asset.
|
||||
- Changing atlas membership, trimming or slicing can affect animation tracks, nested prefabs and material/batching behavior. Inspect incoming references before a structural change and report unsupported identity preservation rather than rebuilding references by name.
|
||||
- After import, `check_asset_ready` verifies only the imported AssetDB identity; inspect the actual SpriteFrame and saved component binding separately. Save/reopen when persistence is required and visually inspect corners at the target size.
|
||||
- Group compatible materials/textures only while preserving intended render order. Editor node/component counts are not a runtime draw-call or GPU measurement.
|
||||
|
||||
Sources: [Sprite](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/editor/sprite.html) and [image assets](https://docs.cocos.com/creator/3.8/manual/en/asset/image.html).
|
||||
@@ -0,0 +1,11 @@
|
||||
# Fonts, text sizing, and requested localization
|
||||
|
||||
- Preserve the project's font system: system font, imported TTF/OTF, bitmap font, RichText, or a project-specific localization component. Resolve font assets and their actual component bindings; do not replace the font strategy merely to silence a warning.
|
||||
- Verify fontSize, lineHeight, alignment, wrapping, contentSize, cacheMode and overflow at the intended viewport. CLAMP clips, SHRINK changes readable size and can cost CPU on dynamic text, and RESIZE_HEIGHT transfers height ownership to the label. Choose from project policy rather than applying SHRINK everywhere.
|
||||
- Check CJK, punctuation, digits, icons and other required glyphs in representative strings. Include line breaks, long translations and dynamic/code-composed strings when localization is requested. A successful string assignment does not establish glyph coverage or readability.
|
||||
- Bitmap-font atlas glyphs, character-cache capacity, fallback behavior and persisted font assets need separate checks. If coverage cannot be measured, report unknown rather than assuming all characters render.
|
||||
- For requested localization, identify the existing locale IDs and mapping, text keys, authored labels, runtime formatting and fallback policy. Change only requested languages/scope and preserve existing services; do not install an unrelated localization package by default.
|
||||
- Read back persisted font/text/localization references and representative outputs. Report covered, missing and unverified strings separately; inspecting authored labels does not prove coverage of runtime-generated text.
|
||||
- Capture representative languages and aspect ratios and inspect missing glyphs, clipping, wrapping and layout growth. Native/device performance and input-method behavior require corresponding platform evidence.
|
||||
|
||||
Sources: [Label](https://docs.cocos.com/creator/3.8/manual/en/ui-system/components/editor/label.html) and [font assets](https://docs.cocos.com/creator/3.8/manual/en/asset/font.html).
|
||||
Reference in new issue
Block a user