Logo Ui Ugui

Ui Ugui

Tổ chứcPhổ biến
Unity-Technologies
ui-ugui

Hiểu, chỉnh sửa và tạo cấu trúc phân cấp Canvas của Unity uGUI, RectTransforms, Layout Groups và giao diện người dùng prefab. Dùng cho các yêu cầu liên quan đến Canvas, uGUI, RectTransform hoặc tệp giao diện người dùng prefab.

Add to TypingMind

Tổng quan

Nhà phát hànhUnity-Technologies
Kho mãskills
Tên kỹ năngui-ugui
Sao
1K
Bản fork
61
Tệp đi kèm
1
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Unity-Technologies công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ui Ugui trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Unity-Technologies/skills/tree/main/skills/ui-ugui
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Unity-Technologies/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ui-ugui .claude/skills/ui-ugui
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ui Ugui trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ui Ugui ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ui Ugui với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Understand existing Unity uGUI, make targeted edits, and generate new Canvas-based hierarchies.

When working with ScrollRect/ScrollView, read the reference file:

Scope

Determine what the user is asking for:

Request TypeAction
Question about UIUnderstand — analyze hierarchy, explain structure
Change specific elementEdit — targeted modification only
Create new UIGenerate — create new hierarchy
Fix/improve existing UIEdit — modify existing, don't rebuild

Generate only what is requested:

RequestOutput
UI layoutPrefab or scene hierarchy only
"with code" / "with logic" / "functional"Hierarchy + scripts

These do NOT imply scripts:

  • "proper buttons" → well-configured Button components
  • "working UI" → valid hierarchy that renders
  • "menu screen" → visual layout only

Critical Rules

Namespace disambiguation:

  • Always use fully qualified type names when creating or referencing UI components
  • UnityEngine.UI.Image, not Image
  • UnityEngine.UI.Button, not Button
  • Other namespaces in the project can cause ambiguous type errors

Verify before modifying:

  • Always check what currently exists before making changes
  • Confirm parent objects exist before adding children
  • Verify components are present before modifying properties
  • Never assume hierarchy state — query it first

Incremental fixes over rebuilds:

  • When fixing issues, make targeted corrections
  • Never destroy and recreate entire hierarchies to fix problems — destroyed objects cause null reference cascades
  • Prefer identifying the specific broken property and fixing only that over rewriting large sections
  • When a fix fails, revert the change before trying an alternative approach

One change at a time:

  • Make a single change, then verify the result
  • Do not batch multiple unrelated modifications
  • Be careful not to inadvertently modify or remove adjacent elements when editing a specific one
  • If something fails, understand why before trying alternatives
  • Avoid "shotgun debugging" with multiple simultaneous changes

Color and visibility:

  • Ensure text is readable by default: When choosing colors, ensure text contrasts with its background — but respect intentional low-contrast uses (disabled states, placeholder text, decorative elements)
  • Check visibility for new elements: After creating UI elements, verify they have non-zero size and are within parent bounds. Elements intentionally created hidden (for later toggling, animation, etc.) are fine

Specification adherence:

  • Honor user specifications exactly: When the user provides pixel dimensions, hex colors, positions, spacing, or other exact values, apply them precisely — do not approximate or substitute
  • Minimize unrelated changes: When editing, avoid changing properties the user didn't ask about unless a related adjustment is necessary for the fix to work

Conventions

Follow project patterns first. Search existing files before applying defaults.

TypeConventionGoodBad
GameObject namesPascalCaseSubmitButtonsubmit-button
Prefab pathsFeature foldersAssets/UI/Inventory/Assets/Prefabs/UI/

Workflow

  1. Verify state — Check what exists in the scene/hierarchy before any action.
  2. Analyze — Determine exactly what's needed. No extras.
  3. Search — Find existing prefabs, canvases, assets. Don't assume paths.
  4. Follow project patterns — Match folder structure and naming.
  5. Create or edit — Build structure with proper anchoring, or make targeted edits.
  6. Confirm result — Verify the change worked before moving on.

Canvas Setup

Every UI needs a Canvas:

Canvas (Screen Space - Overlay or Camera)
├── CanvasScaler (Scale With Screen Size recommended)
├── GraphicRaycaster
└── [UI Content]

CanvasScaler settings:

  • Default to UI Scale Mode "Scale With Screen Size" unless the project has a specific reason for "Constant Pixel Size" (e.g., pixel-art, fixed-resolution targets)
  • Reference Resolution: Match project standards (e.g., 1920x1080)
  • When creating a Canvas with Screen Space - Camera, read the camera's reference resolution first
  • Match Width Or Height: 0.5 (balanced)
  • If an existing Canvas uses "Constant Pixel Size", flag it and ask the user before changing
  • Prefer anchors and Layout Groups over absolute pixel positions for layout

Layout Components

Layout Groups control child sizing:

  • When a parent has a Layout Group, it manages child RectTransforms
  • Children's anchors and sizeDelta may be overridden by the parent
  • Understand whether the parent or child controls size before setting values

Vertical/Horizontal Layout Groups:

  • Control Child Size: determines if parent sets child dimensions
  • Child Force Expand: determines if children stretch to fill space
  • If Control Child Size is off, children must have explicit sizes

Avoiding layout conflicts:

  • Do not manually set child anchors/size when parent controls them
  • Do not add Layout Group to an element that should have fixed size
  • Nested Layout Groups require careful configuration of each level
  • When layout is wrong, check parent settings before modifying child
  • ContentSizeFitter on the same object as a Layout Group that has Control Child Size enabled = conflict
  • ContentSizeFitter on a child whose parent has Control Child Size enabled = ContentSizeFitter is overridden (wasted)
  • When using ContentSizeFitter with a Layout Group parent, disable Control Child Size on the parent for the relevant axis
  • Common pattern: ScrollView Content should have ContentSizeFitter + VerticalLayoutGroup where VLG controls children but ContentSizeFitter sizes the Content itself

Grid Layout Group:

  • For inventory grids, card layouts
  • Cell Size must be set explicitly — children are sized to match
  • Constraint controls row/column limits

Content Size Fitter:

  • Horizontal/Vertical Fit: Preferred Size
  • Use on containers that should size to their content
  • Requires a layout element or text component to provide preferred size

RectTransform Anchoring

Elements must have non-zero size to be visible:

  • Set explicit width/height via sizeDelta, or
  • Use stretch anchors with proper offsets, or
  • Let a parent Layout Group control size (with Control Child Size enabled)

Anchor configuration order:

  1. Set anchor preset first (corner, edge, or stretch)
  2. Then set position/offset values
  3. Verify the resulting size is non-zero

Common patterns:

  • Stretch anchors — for responsive elements that fill available space
  • Corner anchors — for fixed-position, fixed-size elements
  • Edge anchors — for elements that stretch in one direction only

Positioning from natural language descriptions: When the user describes a position (e.g., "top right", "bottom bar", "left side"):

  1. Determine if it's a corner (fixed point), an edge (stretch along one axis), or fill (stretch both axes)
  2. Set anchor min and anchor max — for corners these are the same point; for edges/fill they span a range
  3. Set pivot to match the anchor point — pivot must align with where the element is anchored, not left at the default (0.5, 0.5). A "top right" element needs pivot at the top-right corner; a "top bar" needs pivot at the top edge center
  4. Set position/offset values after anchors and pivot are configured

Visibility checklist:

  • Width and height are both greater than zero
  • Element is within parent bounds
  • Element is not obscured by siblings (check hierarchy order)
  • Image component has a sprite or color with alpha > 0

Common Components

ComponentUse Case
ImageBackgrounds, icons
RawImageRender textures, videos
Text (TMP)All text (use TextMeshPro)
ButtonClickable elements
ToggleCheckboxes, radio buttons
SliderValue ranges
ScrollRectScrollable content
InputField (TMP)Text input

Best Practices

  • Use TextMeshPro for all text (not legacy Text)
  • WorldSpace UI that have text should also use Text Mesh Pro, be sure to review the project and import the TMP essentials if they are not present in the project
  • If the TextMeshPro Essentials were imported be sure to close the TMP Importer Windows and the Import Unity Package Window once the assets are imported
  • Organize hierarchy logically (Header, Content, Footer)
  • Use Layout Groups instead of manual positioning where possible
  • Set Raycast Target = false on non-interactive images
  • Use sprite atlases for performance

Never use EditorApplication.ExecuteMenuItem("Window/TextMeshPro/Import TMP Essential Resources"), unless the user asks for an interactive TMP Essentials installation. It opens a modal dialog that blocks whatever invoked it until a human dismisses it.

Do not use AssetDatabase.ImportPackage() for TMP resources, instead TMP_PackageResourceImporter.ImportResources() is the canonical non-interactive API.

Interaction Readiness

Before completing any UI that contains interactive elements, verify:

  1. EventSystem must exist in the scene (exactly one)
  2. GraphicRaycaster must be on the Canvas
  3. Raycast Target = true on interactive elements (and false on non-interactive ones to avoid blocking)
  4. Button.onClick should be wired (via inspector or script) — only when scripts or logic were requested

If the first three are missing, interactive elements will exist visually but fail silently.

Understanding

When the user asks questions about existing UI:

Read the hierarchy first. Don't assume — always inspect the scene or prefab before answering.

Analyze structure:

  • Identify the Canvas and its render mode
  • Map the parent-child relationships
  • Identify which Layout Groups control which children
  • Check RectTransform anchor configurations

Answer questions about:

  • "What does this button do?" → Explain component, hierarchy position, event wiring
  • "How is this laid out?" → Describe Layout Groups, anchoring, hierarchy
  • "Why is this invisible?" → Check size, anchors, parent bounds, component state
  • "What controls this element's size?" → Trace Layout Group settings or anchors

Editing

For targeted changes to existing UI:

Read before editing. Always inspect the current state first.

Edit workflow:

  1. Verify the target object exists
  2. Identify the specific property or component to change
  3. Make the minimal change required
  4. Verify the result before proceeding

Never destroy to fix:

  • Destroying objects cascades to null references elsewhere
  • Fix properties in place rather than recreating
  • If an element must be removed, update all references first

C# (Only When Requested)

  • Use fully qualified UI types to avoid namespace conflicts
  • Use [SerializeField] for inspector references
  • Cache component references in Awake()
  • Use events/delegates for button callbacks
  • Place scripts in same folder as prefabs (follow project patterns)

Component references:

  • Verify referenced objects exist before accessing them
  • Handle cases where serialized references may be null
  • When wiring up references, confirm the target component is present

Error Recovery

When something goes wrong:

Stop and diagnose:

  • Identify the exact error or symptom
  • Determine the root cause before attempting fixes
  • Do not make speculative changes

Fix incrementally:

  • Address one issue at a time
  • Verify each fix before moving to the next
  • Keep track of what was changed

Avoid destructive patterns:

  • "Start fresh" strategies destroy working elements along with broken ones
  • Rebuilding entire hierarchies creates more problems than it solves
  • Prefer surgical fixes to wholesale replacements

When stuck:

  • Re-verify the current state of the hierarchy
  • Check if previous changes were actually applied
  • Consider if the approach itself is wrong rather than the implementation

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Ui Ugui làm được gì?

Hiểu, chỉnh sửa và tạo cấu trúc phân cấp Canvas của Unity uGUI, RectTransforms, Layout Groups và giao diện người dùng prefab. Dùng cho các yêu cầu liên quan đến Canvas, uGUI, RectTransform hoặc tệp giao diện người dùng prefab.

Vì sao nên dùng Ui Ugui trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ui Ugui là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ui Ugui trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Unity-Technologies/skills/tree/main/skills/ui-ugui. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ui Ugui?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ui Ugui với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ui Ugui với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ui Ugui có miễn phí không?

Kỹ năng này được Unity-Technologies phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇