Files
mayi_coco/.agents/skills/funplay-cocos-ui-composition/SKILL.md
T

2.9 KiB

name, description
name description
funplay-cocos-ui-composition 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. 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.
  • For resolution, orientation, SafeArea, Widget/Layout, scrolling or masks: layout and adaptation.
  • For SpriteFrames, nine-slice, atlas or importer edits: sprites and importers.
  • For fonts, text overflow, glyph coverage or requested localization: text and localization.
  • For event bindings, real input, animation, screenshots or performance evidence: input and validation.

These references are conditional; do not load every file for a focused edit.