Skip to content

[skill update] Update for UI instructions in the skills#726

Merged
Scriptwonder merged 2 commits intoCoplayDev:betafrom
Scriptwonder:ui_skill_extension
Feb 12, 2026
Merged

[skill update] Update for UI instructions in the skills#726
Scriptwonder merged 2 commits intoCoplayDev:betafrom
Scriptwonder:ui_skill_extension

Conversation

@Scriptwonder
Copy link
Collaborator

@Scriptwonder Scriptwonder commented Feb 11, 2026

Description

Add UI-based descriptions for LLM to understand how to draw batch requests to generate UI

Type of Change

Save your change type

  • Documentation update

Changes Made

Only update the .skill files. I am really not sure if I should add more token usage to this big MCP server with a manage_ui (our current MCP tool took around 10% of the Opus4.6 context window, which is not small), since ui apis are basically using atomic operations from manage_component. We can implement further UI operations, but that can also be taken care of by manage_component. right?
@msanatan @dsarno, love to hear what you guys think about this tradeoff between context/usage and more power/features.

Testing/Screenshots/Recordings

Documentation Updates

  • I have added/removed/modified tools or resources
  • If yes, I have updated all documentation files using:
    • The LLM prompt at tools/UPDATE_DOCS_PROMPT.md (recommended)
    • Manual updates following the guide at tools/UPDATE_DOCS.md

Related Issues

Additional Notes

Summary by Sourcery

Document UI creation workflows for Unity-MCP and reference them from the Unity skill metadata.

Documentation:

  • Add a comprehensive 'UI Creation Workflows' section describing how to build common Unity UI structures with batch_execute and manage_components/gameobject.
  • Extend the workflows table of contents to include UI creation workflows in both the internal and packaged documentation.
  • Update the skill capability table to advertise UI-related batch operations and link to the new UI workflows reference.

Summary by CodeRabbit

  • Documentation
    • Added a UI category to Core Tool Categories documenting batch operations for UI elements.
    • Added comprehensive UI Creation Workflows with templates/examples for Canvas-based UI (panels, text, buttons, sliders, input fields, toggles, layout groups, full menu).
    • Added template guidance and a warning about placeholders and varying payload shapes.
    • Clarified batch_execute is advisory for parallelism and not transactional (no automatic rollback).
    • Note: UI workflows content appears duplicated.

Copilot AI review requested due to automatic review settings February 11, 2026 22:06
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 11, 2026

Reviewer's Guide

Adds comprehensive documentation for creating Unity UGUI-based UI via batch_execute, including new UI Creation Workflows section and a UI category in the SKILL overview, duplicated for both the checked-in and .claude versions of the Unity MCP skill docs.

Flow diagram for batch_execute based UI creation workflows

flowchart TD
    start["Design UI to create"] --> chooseBatch["Use batch_execute with fail_fast=True"]

    chooseBatch --> createCanvas["Create Canvas GameObject"]
    createCanvas --> addCanvasComp["Add Canvas, CanvasScaler, GraphicRaycaster components"]
    addCanvasComp --> configCanvas["Set Canvas renderMode and CanvasScaler properties"]

    chooseBatch --> checkEventSystem["Check for existing EventSystem in scene"]
    checkEventSystem --> hasEventSystem{EventSystem exists?}
    hasEventSystem -->|No| createEventSystem["Create EventSystem GameObject"]
    createEventSystem --> addEventComponents["Add EventSystem + input module components"]
    hasEventSystem -->|Yes| skipEventSystem["Skip EventSystem creation"]

    configCanvas --> createUIContainer["Create container under Canvas (e.g. MenuPanel)"]
    createUIContainer --> addPanelImage["Add Image component for panel background"]

    createUIContainer --> addLayoutGroup["Optionally add LayoutGroup and ContentSizeFitter"]

    addPanelImage --> addChildren["Create child UI elements"]

    subgraph Child_UI_Elements
        addChildren --> btnBranch["Create Button hierarchy"]
        btnBranch --> btnRoot["Create Button GameObject under panel"]
        btnRoot --> btnComponents["Add Image + Button components"]
        btnComponents --> btnLabelGO["Create label child GameObject"]
        btnLabelGO --> btnLabelTMP["Add TextMeshProUGUI and set text/alignment"]

        addChildren --> textBranch["Create standalone text"]
        textBranch --> textGO["Create Text GameObject under panel"]
        textGO --> textTMP["Add TextMeshProUGUI and set properties"]

        addChildren --> sliderBranch["Create Slider hierarchy"]
        sliderBranch --> sliderRoot["Create Slider root under Canvas or panel"]
        sliderRoot --> sliderComponents["Add Slider + Image components"]
        sliderComponents --> sliderBG["Create Background with Image"]
        sliderComponents --> sliderFillArea["Create Fill Area/Fill with Image"]
        sliderComponents --> sliderHandleArea["Create Handle Slide Area/Handle with Image"]

        addChildren --> inputBranch["Create Input Field hierarchy"]
        inputBranch --> inputRoot["Create Input root under panel"]
        inputRoot --> inputComponents["Add Image + TMP_InputField"]
        inputComponents --> inputTextArea["Create Text Area with RectMask2D"]
        inputTextArea --> inputPlaceholder["Create Placeholder with TextMeshProUGUI"]
        inputTextArea --> inputText["Create Text with TextMeshProUGUI"]

        addChildren --> toggleBranch["Create Toggle hierarchy"]
        toggleBranch --> toggleRoot["Create Toggle root under panel"]
        toggleRoot --> toggleComp["Add Toggle component"]
        toggleComp --> toggleBG["Create Background with Image"]
        toggleBG --> toggleCheck["Create Checkmark with Image"]
        toggleRoot --> toggleLabelGO["Create Label with TextMeshProUGUI"]
    end

    btnLabelTMP --> endBatch["Complete batch_execute call"]
    textTMP --> endBatch
    sliderHandleArea --> endBatch
    inputText --> endBatch
    toggleLabelGO --> endBatch
    skipEventSystem --> createUIContainer
    addEventComponents --> createUIContainer
Loading

Flow diagram for Unity UGUI main menu hierarchy created via batch_execute

flowchart TD
    subgraph Scene
        MenuCanvas["MenuCanvas GameObject"]
        EventSystem["EventSystem GameObject"]
    end

    %% Canvas components
    MenuCanvas --> CanvasComp["Canvas component"]
    MenuCanvas --> CanvasScalerComp["CanvasScaler component"]
    MenuCanvas --> GraphicRaycasterComp["GraphicRaycaster component"]

    CanvasComp --> CanvasRenderMode["renderMode = ScreenSpaceOverlay (0)"]
    CanvasScalerComp --> CanvasScaleProps["uiScaleMode = ScaleWithScreenSize (1)\nreferenceResolution = [1920, 1080]"]

    %% EventSystem components
    EventSystem --> EventSystemComp["EventSystem component"]
    EventSystem --> InputModuleComp["StandaloneInputModule or InputSystemUIInputModule"]

    %% Panel hierarchy
    MenuCanvas --> MenuPanel["MenuPanel GameObject"]
    MenuPanel --> MenuPanelImage["Image component (background)"]
    MenuPanel --> MenuPanelLayout["VerticalLayoutGroup component"]

    MenuPanelLayout --> MenuPanelLayoutProps["spacing = 20\nchildAlignment = MiddleCenter (4)\nchildForceExpandWidth = True\nchildForceExpandHeight = False"]

    %% Title
    MenuPanel --> Title["Title GameObject"]
    Title --> TitleTMP["TextMeshProUGUI component"]
    TitleTMP --> TitleProps["text = My Game\nfontSize = 64\nalignment = MiddleCenter (514)\ncolor = [1, 1, 1, 1]"]

    %% Play button
    MenuPanel --> PlayButton["PlayButton GameObject"]
    PlayButton --> PlayButtonImage["Image component"]
    PlayButtonImage --> PlayButtonColor["color = [0.2, 0.6, 1.0, 1.0]"]
    PlayButton --> PlayButtonComp["Button component"]
    PlayButton --> PlayButtonLabel["PlayButton_Label GameObject"]
    PlayButtonLabel --> PlayButtonLabelTMP["TextMeshProUGUI component"]
    PlayButtonLabelTMP --> PlayButtonLabelProps["text = Play\nfontSize = 32\nalignment = MiddleCenter (514)"]

    %% Settings button
    MenuPanel --> SettingsButton["SettingsButton GameObject"]
    SettingsButton --> SettingsButtonImage["Image component"]
    SettingsButtonImage --> SettingsButtonColor["color = [0.3, 0.3, 0.35, 1.0]"]
    SettingsButton --> SettingsButtonComp["Button component"]
    SettingsButton --> SettingsButtonLabel["SettingsButton_Label GameObject"]
    SettingsButtonLabel --> SettingsButtonLabelTMP["TextMeshProUGUI component"]
    SettingsButtonLabelTMP --> SettingsButtonLabelProps["text = Settings\nfontSize = 32\nalignment = MiddleCenter (514)"]

    %% Quit button
    MenuPanel --> QuitButton["QuitButton GameObject"]
    QuitButton --> QuitButtonImage["Image component"]
    QuitButtonImage --> QuitButtonColor["color = [0.8, 0.2, 0.2, 1.0]"]
    QuitButton --> QuitButtonComp["Button component"]
    QuitButton --> QuitButtonLabel["QuitButton_Label GameObject"]
    QuitButtonLabel --> QuitButtonLabelTMP["TextMeshProUGUI component"]
    QuitButtonLabelTMP --> QuitButtonLabelProps["text = Quit\nfontSize = 32\nalignment = MiddleCenter (514)"]
Loading

File-Level Changes

Change Details Files
Document UI creation workflows using batch_execute with manage_gameobject and manage_components for common Unity UGUI patterns.
  • Extend workflows reference docs with a new 'UI Creation Workflows' section covering Canvas, EventSystem, Panel, TextMeshPro text, Button, Slider, TMP_InputField, Toggle, layout groups, and a complete main menu example using batch_execute.
  • Add quick-reference tables summarizing required components and notes for common UI elements and layout components.
  • Introduce a new 'UI' capability row in SKILL.md that describes UI creation via batch_execute plus manage_gameobject/manage_components and links to the UI workflows section.
  • Mirror all documentation updates in both the repository-facing and .claude copies of workflows.md and SKILL.md.
.claude/skills/unity-mcp-skill/references/workflows.md
.claude/skills/unity-mcp-skill/SKILL.md
unity-mcp-skill/references/workflows.md
unity-mcp-skill/SKILL.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Adds UI Creation Workflows and a UI category to Unity-MCP documentation, inserts a template warning/notice, and clarifies batch_execute behavior (parallel is advisory; batches are non‑transactional). Also expands parameter guidance and duplicates UI workflow content in workflows.md.

Changes

Cohort / File(s) Summary
Skill README / Category docs
.claude/skills/unity-mcp-skill/SKILL.md, unity-mcp-skill/SKILL.md
Added template notice and pre-check guidance; added UI row to Core Tool Categories; clarified batch_execute parallel flag is advisory and added non‑transactional note; added parameter shape guidance.
UI Workflow Templates (docs)
.claude/skills/unity-mcp-skill/references/workflows.md, unity-mcp-skill/references/workflows.md
Inserted comprehensive UI Creation Workflows (Canvas, EventSystem, Panels, Text, Buttons, Sliders, Input Fields, Toggles, Layout Groups, complete main menu examples). Note: content appears duplicated within the file.
Tools reference updates
.claude/skills/unity-mcp-skill/references/tools-reference.md, unity-mcp-skill/references/tools-reference.md
Added template warning banner; reworded batch_execute parallel description to be advisory; added non‑transactional caveat to batch_execute.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
A rabbit hops through canvas light,
arranging buttons, text, and sprite.
Templates whisper, "Check your place,"
batches run at their own pace.
Hooray — a UI garden, soft and bright! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating skill files with UI instructions for LLM batch request generation.
Description check ✅ Passed The description covers the main objective and change type, but lacks specific documentation of all files modified and omits required documentation update checklist completion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Scriptwonder Scriptwonder changed the title Update for UI-based batch execution [skill update] Update for UI instructions in the skills Feb 11, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new UI workflow section is duplicated verbatim in both .claude/skills/unity-mcp-skill/references/workflows.md and unity-mcp-skill/references/workflows.md; consider a single source of truth (or a generation step) to avoid future drift between the two copies.
  • Since many of the examples rely on batch_execute and mention the 25-command limit only in the final example, it might be helpful to briefly call out near the top of the UI section that some patterns may need to be split into multiple batches in more complex real-world uses.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new UI workflow section is duplicated verbatim in both `.claude/skills/unity-mcp-skill/references/workflows.md` and `unity-mcp-skill/references/workflows.md`; consider a single source of truth (or a generation step) to avoid future drift between the two copies.
- Since many of the examples rely on `batch_execute` and mention the 25-command limit only in the final example, it might be helpful to briefly call out near the top of the UI section that some patterns may need to be split into multiple batches in more complex real-world uses.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In @.claude/skills/unity-mcp-skill/references/workflows.md:
- Around line 535-556: The guidance and example for creating an EventSystem are
inconsistent: the prose recommends using
UnityEngine.InputSystem.UI.InputSystemUIInputModule but the example adds
UnityEngine.EventSystems.StandaloneInputModule; update the example (the
batch_execute call that uses manage_gameobject and manage_components targeting
"EventSystem") so the component_type matches the written guidance, or add a
brief clarifying note next to the example that shows both options and when to
use UnityEngine.InputSystem.UI.InputSystemUIInputModule versus
UnityEngine.EventSystems.StandaloneInputModule (legacy Input Manager). Also
apply the same fix to the other occurrence referenced (lines ~823-841) so both
examples and notes are consistent.
- Around line 643-742: The Slider/Toggle/TMP_InputField hierarchies are missing
required serialized references so the UI controls won't work; after creating the
GameObjects/components (e.g., HealthSlider, Background, Fill Area/Fill, Handle
Slide Area/Handle, NameInput, Text Area, Placeholder, Text) add
manage_components steps to set the component reference fields: for Slider set
fillRect to "Fill" RectTransform and handleRect to "Handle" RectTransform (on
the Slider component), for Toggle set targetGraphic and graphic to the
appropriate Image components (e.g., Background/Checkmark), and for
TMP_InputField set textViewport to "Text Area" RectTransform, textComponent to
"Text" TextMeshProUGUI and placeholder to "Placeholder" TextMeshProUGUI using
manage_components action "set_property" (or equivalent) targeting the specific
component types (Slider, Toggle, TMP_InputField) to wire those fields.

In `@unity-mcp-skill/references/workflows.md`:
- Around line 535-556: The documentation currently recommends using
UnityEngine.InputSystem.UI.InputSystemUIInputModule for projects using the new
Input System but the example snippet adds
UnityEngine.EventSystems.StandaloneInputModule instead; update the example
inside the EventSystem section so the manage_components call that adds the input
module uses UnityEngine.InputSystem.UI.InputSystemUIInputModule to match the
guidance (or add a concise conditional note immediately after the snippet that
shows which component to use per input system and references both
UnityEngine.InputSystems.UI.InputSystemUIInputModule and
UnityEngine.EventSystems.StandaloneInputModule to avoid confusion); ensure the
same correction is applied to the other occurrence mentioned (lines ~823-841)
and keep the batch_execute/manage_components structure unchanged.
- Around line 643-742: The Slider/Toggle/TMP_InputField templates create the
GameObject hierarchy but never wire required component references, so add
follow-up manage_components "set_property" commands to assign those fields: for
Slider on "HealthSlider" set fillRect to the RectTransform of "Fill", handleRect
to the RectTransform of "Handle", and targetGraphic to the Image on
"Background"; for Toggle set targetGraphic/graphic to the appropriate
Image/Graphic objects you create; for TMP_InputField on "NameInput" set
textViewport to the RectTransform of "Text Area", textComponent to the
TextMeshProUGUI on "Text", and placeholder to the TextMeshProUGUI on
"Placeholder" (use the component targets and property names like fillRect,
handleRect, targetGraphic, textViewport, textComponent, placeholder in
manage_components set_property entries); place these set_property commands
immediately after the components are added so the controls function and render
correctly.

Comment on lines +535 to +556
### Create EventSystem (Required Once Per Scene for UI Interaction)

If no EventSystem exists in the scene, buttons and other interactive UI elements won't respond to input. Create one alongside your first Canvas.

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.EventSystems.EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.InputSystem.UI.InputSystemUIInputModule"
}}
])
```

> **Note:** For projects using legacy Input Manager instead of Input System, use `"component_type": "UnityEngine.EventSystems.StandaloneInputModule"` instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align InputSystem vs legacy input module guidance.

The EventSystem section recommends InputSystemUIInputModule, but the complete example uses StandaloneInputModule. Please make the example match the guidance or add a short note indicating which one to use per input system.

Also applies to: 823-841

🤖 Prompt for AI Agents
In @.claude/skills/unity-mcp-skill/references/workflows.md around lines 535 -
556, The guidance and example for creating an EventSystem are inconsistent: the
prose recommends using UnityEngine.InputSystem.UI.InputSystemUIInputModule but
the example adds UnityEngine.EventSystems.StandaloneInputModule; update the
example (the batch_execute call that uses manage_gameobject and
manage_components targeting "EventSystem") so the component_type matches the
written guidance, or add a brief clarifying note next to the example that shows
both options and when to use UnityEngine.InputSystem.UI.InputSystemUIInputModule
versus UnityEngine.EventSystems.StandaloneInputModule (legacy Input Manager).
Also apply the same fix to the other occurrence referenced (lines ~823-841) so
both examples and notes are consistent.

Comment on lines +643 to +742
### Create Slider

A Slider requires a specific hierarchy: the slider root, a background, a fill area with fill, and a handle area with handle.

```python
batch_execute(fail_fast=True, commands=[
# Slider root
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "HealthSlider", "parent": "MainCanvas"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Slider"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Image"
}},
# Background
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Background", "parent": "HealthSlider"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Background", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Background",
"component_type": "Image", "property": "color",
"value": [0.3, 0.3, 0.3, 1.0]
}},
# Fill Area + Fill
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Fill Area", "parent": "HealthSlider"
}},
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Fill", "parent": "Fill Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Fill", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Fill",
"component_type": "Image", "property": "color",
"value": [0.2, 0.8, 0.2, 1.0]
}},
# Handle Area + Handle
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Handle Slide Area", "parent": "HealthSlider"
}},
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Handle", "parent": "Handle Slide Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Handle", "component_type": "Image"
}}
])
```

### Create Input Field (TextMeshPro)

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "NameInput", "parent": "MenuPanel"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput",
"component_type": "TMP_InputField"
}},
# Text area child
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Text Area", "parent": "NameInput"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Text Area",
"component_type": "RectMask2D"
}},
# Placeholder
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Placeholder", "parent": "Text Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Placeholder",
"component_type": "TextMeshProUGUI"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Placeholder",
"component_type": "TextMeshProUGUI",
"properties": {"text": "Enter name...", "fontStyle": 2, "color": [0.5, 0.5, 0.5, 0.5]}
}},
# Actual text
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Text", "parent": "Text Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Text",
"component_type": "TextMeshProUGUI"
}}
])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Wire required component references for Slider/Toggle/TMP_InputField.

These templates build the hierarchy but don’t assign required references on the components (e.g., Slider fillRect/handleRect, Toggle targetGraphic/graphic, TMP_InputField textViewport/textComponent/placeholder). As written, the controls won’t function or render correctly unless those fields are wired. Please add manage_components steps (or an explicit note) to assign those references after creation.

Also applies to: 745-781

🤖 Prompt for AI Agents
In @.claude/skills/unity-mcp-skill/references/workflows.md around lines 643 -
742, The Slider/Toggle/TMP_InputField hierarchies are missing required
serialized references so the UI controls won't work; after creating the
GameObjects/components (e.g., HealthSlider, Background, Fill Area/Fill, Handle
Slide Area/Handle, NameInput, Text Area, Placeholder, Text) add
manage_components steps to set the component reference fields: for Slider set
fillRect to "Fill" RectTransform and handleRect to "Handle" RectTransform (on
the Slider component), for Toggle set targetGraphic and graphic to the
appropriate Image components (e.g., Background/Checkmark), and for
TMP_InputField set textViewport to "Text Area" RectTransform, textComponent to
"Text" TextMeshProUGUI and placeholder to "Placeholder" TextMeshProUGUI using
manage_components action "set_property" (or equivalent) targeting the specific
component types (Slider, Toggle, TMP_InputField) to wire those fields.

Comment on lines +535 to +556
### Create EventSystem (Required Once Per Scene for UI Interaction)

If no EventSystem exists in the scene, buttons and other interactive UI elements won't respond to input. Create one alongside your first Canvas.

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.EventSystems.EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.InputSystem.UI.InputSystemUIInputModule"
}}
])
```

> **Note:** For projects using legacy Input Manager instead of Input System, use `"component_type": "UnityEngine.EventSystems.StandaloneInputModule"` instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align InputSystem vs legacy input module guidance.

The EventSystem section recommends InputSystemUIInputModule, but the complete example uses StandaloneInputModule. Please make the example match the guidance or add a short note indicating which one to use per input system.

Also applies to: 823-841

🤖 Prompt for AI Agents
In `@unity-mcp-skill/references/workflows.md` around lines 535 - 556, The
documentation currently recommends using
UnityEngine.InputSystem.UI.InputSystemUIInputModule for projects using the new
Input System but the example snippet adds
UnityEngine.EventSystems.StandaloneInputModule instead; update the example
inside the EventSystem section so the manage_components call that adds the input
module uses UnityEngine.InputSystem.UI.InputSystemUIInputModule to match the
guidance (or add a concise conditional note immediately after the snippet that
shows which component to use per input system and references both
UnityEngine.InputSystems.UI.InputSystemUIInputModule and
UnityEngine.EventSystems.StandaloneInputModule to avoid confusion); ensure the
same correction is applied to the other occurrence mentioned (lines ~823-841)
and keep the batch_execute/manage_components structure unchanged.

Comment on lines +643 to +742
### Create Slider

A Slider requires a specific hierarchy: the slider root, a background, a fill area with fill, and a handle area with handle.

```python
batch_execute(fail_fast=True, commands=[
# Slider root
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "HealthSlider", "parent": "MainCanvas"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Slider"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Image"
}},
# Background
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Background", "parent": "HealthSlider"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Background", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Background",
"component_type": "Image", "property": "color",
"value": [0.3, 0.3, 0.3, 1.0]
}},
# Fill Area + Fill
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Fill Area", "parent": "HealthSlider"
}},
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Fill", "parent": "Fill Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Fill", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Fill",
"component_type": "Image", "property": "color",
"value": [0.2, 0.8, 0.2, 1.0]
}},
# Handle Area + Handle
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Handle Slide Area", "parent": "HealthSlider"
}},
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Handle", "parent": "Handle Slide Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Handle", "component_type": "Image"
}}
])
```

### Create Input Field (TextMeshPro)

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "NameInput", "parent": "MenuPanel"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput",
"component_type": "TMP_InputField"
}},
# Text area child
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Text Area", "parent": "NameInput"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Text Area",
"component_type": "RectMask2D"
}},
# Placeholder
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Placeholder", "parent": "Text Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Placeholder",
"component_type": "TextMeshProUGUI"
}},
{"tool": "manage_components", "params": {
"action": "set_property", "target": "Placeholder",
"component_type": "TextMeshProUGUI",
"properties": {"text": "Enter name...", "fontStyle": 2, "color": [0.5, 0.5, 0.5, 0.5]}
}},
# Actual text
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "Text", "parent": "Text Area"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "Text",
"component_type": "TextMeshProUGUI"
}}
])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Wire required component references for Slider/Toggle/TMP_InputField.

These templates build the hierarchy but don’t assign required references on the components (e.g., Slider fillRect/handleRect, Toggle targetGraphic/graphic, TMP_InputField textViewport/textComponent/placeholder). As written, the controls won’t function or render correctly unless those fields are wired. Please add manage_components steps (or an explicit note) to assign those references after creation.

Also applies to: 745-781

🤖 Prompt for AI Agents
In `@unity-mcp-skill/references/workflows.md` around lines 643 - 742, The
Slider/Toggle/TMP_InputField templates create the GameObject hierarchy but never
wire required component references, so add follow-up manage_components
"set_property" commands to assign those fields: for Slider on "HealthSlider" set
fillRect to the RectTransform of "Fill", handleRect to the RectTransform of
"Handle", and targetGraphic to the Image on "Background"; for Toggle set
targetGraphic/graphic to the appropriate Image/Graphic objects you create; for
TMP_InputField on "NameInput" set textViewport to the RectTransform of "Text
Area", textComponent to the TextMeshProUGUI on "Text", and placeholder to the
TextMeshProUGUI on "Placeholder" (use the component targets and property names
like fillRect, handleRect, targetGraphic, textViewport, textComponent,
placeholder in manage_components set_property entries); place these set_property
commands immediately after the components are added so the controls function and
render correctly.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI-focused workflow documentation so an LLM can reliably construct Unity UGUI hierarchies via batch_execute using existing atomic tools (manage_gameobject, manage_components), and surfaces the new UI guidance in the skill index.

Changes:

  • Added a new “UI Creation Workflows” section with batch templates for common UGUI elements (Canvas, EventSystem, Panel, Text, Button, Slider, Input Field, Toggle, Layout Groups).
  • Updated the workflows table of contents to include the new UI section.
  • Updated SKILL.md tool category table to point readers to the UI workflows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.

File Description
unity-mcp-skill/references/workflows.md Adds UI creation workflow templates and a quick reference table.
unity-mcp-skill/SKILL.md Adds a UI row linking to the new UI workflows section.
.claude/skills/unity-mcp-skill/references/workflows.md Mirrors the same UI workflow documentation for the Claude skill copy.
.claude/skills/unity-mcp-skill/SKILL.md Mirrors the same UI row/link update for the Claude skill copy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 124 to +127
| **Editor** | `manage_editor`, `execute_menu_item`, `read_console` | Editor control |
| **Testing** | `run_tests`, `get_test_job` | Unity Test Framework |
| **Batch** | `batch_execute` | Parallel/bulk operations |
| **UI** | `batch_execute` with `manage_gameobject` + `manage_components` | Canvas, Panel, Button, Text, Slider, Toggle, Input Field (see [UI workflows](references/workflows.md#ui-creation-workflows)) |
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says “Only update the .skill files”, but this PR changes SKILL.md and references/workflows.md (documentation). Please update the PR description to reflect the actual scope (or adjust the change list) to avoid reviewer confusion.

Copilot uses AI. Check for mistakes.
Comment on lines +539 to +551
```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.EventSystems.EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.InputSystem.UI.InputSystemUIInputModule"
}}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This EventSystem example uses UnityEngine.InputSystem.UI.InputSystemUIInputModule, but the later “Complete Example” uses StandaloneInputModule, and the note implies Standalone is the legacy fallback. Please make these consistent (pick one default module and use it in both places), and consider defaulting the snippet to the module that’s always available in projects that don’t have the Input System package installed.

Copilot uses AI. Check for mistakes.
Comment on lines +643 to +656
### Create Slider

A Slider requires a specific hierarchy: the slider root, a background, a fill area with fill, and a handle area with handle.

```python
batch_execute(fail_fast=True, commands=[
# Slider root
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "HealthSlider", "parent": "MainCanvas"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Slider"
}},
{"tool": "manage_components", "params": {
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Slider template creates the expected child objects, but it never assigns the Slider’s required references (e.g., fillRect, handleRect, and often targetGraphic). Without these, the slider may not display or update correctly. Consider adding steps (possibly using paths like HealthSlider/Fill Area/Fill and HealthSlider/Handle Slide Area/Handle) to set these properties, or explicitly call out that manual wiring is needed after creation.

Copilot uses AI. Check for mistakes.
Comment on lines +699 to +712
### Create Input Field (TextMeshPro)

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "NameInput", "parent": "MenuPanel"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput",
"component_type": "TMP_InputField"
}},
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For TMP_InputField, creating the child hierarchy isn’t sufficient for a functional input field—the component typically needs references assigned for its text/placeholder/viewport fields (e.g., textComponent, placeholder, textViewport). Consider adding set_property steps to wire these up (using stable paths), or note that these references must be set after creation to avoid a broken control.

Copilot uses AI. Check for mistakes.
Comment on lines +539 to +551
```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.EventSystems.EventSystem"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "EventSystem",
"component_type": "UnityEngine.InputSystem.UI.InputSystemUIInputModule"
}}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This EventSystem example uses UnityEngine.InputSystem.UI.InputSystemUIInputModule, but the later “Complete Example” uses StandaloneInputModule, and the note implies Standalone is the legacy fallback. Please make these consistent (pick one default module and use it in both places), and consider defaulting the snippet to the module that’s always available in projects that don’t have the Input System package installed.

Copilot uses AI. Check for mistakes.

### Create Text (TextMeshPro)

TextMeshProUGUI automatically adds a RectTransform when added to a child of a Canvas.
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor accuracy nit: TextMeshProUGUI (and other UGUI components) typically requires a RectTransform regardless of whether the object is already a child of a Canvas; Unity will replace Transform with RectTransform when adding the component. Consider rephrasing to avoid implying it only happens under a Canvas.

Suggested change
TextMeshProUGUI automatically adds a RectTransform when added to a child of a Canvas.
TextMeshProUGUI requires a RectTransform; when you add this component, Unity will automatically replace a standard Transform with a RectTransform if needed.

Copilot uses AI. Check for mistakes.

## UI Creation Workflows

Unity UI (Canvas-based UGUI) requires specific component hierarchies. Use `batch_execute` with `fail_fast=True` to create complete UI elements in a single call. These templates handle the boilerplate so you don't need to remember which components each UI element needs.
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI section states these templates create “complete UI elements”, but for several UGUI controls (e.g., Slider/Toggle/TMP_InputField) the components also require serialized references (like fillRect/handleRect, targetGraphic/graphic, textComponent/placeholder/textViewport). As written, the objects/hierarchy will be created but the controls may not render or behave correctly. Either add follow-up manage_components(action="set_property") steps to wire these references, or adjust the wording to clarify that additional reference wiring is required.

Suggested change
Unity UI (Canvas-based UGUI) requires specific component hierarchies. Use `batch_execute` with `fail_fast=True` to create complete UI elements in a single call. These templates handle the boilerplate so you don't need to remember which components each UI element needs.
Unity UI (Canvas-based UGUI) requires specific component hierarchies. Use `batch_execute` with `fail_fast=True` to create the basic hierarchy and components for common UI elements in a single call. These templates handle most of the boilerplate so you don't need to remember which components each UI element needs, but some controls (for example `Slider`, `Toggle`, or `TMP_InputField`) still require additional `manage_components(action="set_property")` steps to wire serialized references like `fillRect`, `handleRect`, `targetGraphic`, `graphic`, `textComponent`, `placeholder`, or `textViewport`.

Copilot uses AI. Check for mistakes.
Comment on lines +643 to +656
### Create Slider

A Slider requires a specific hierarchy: the slider root, a background, a fill area with fill, and a handle area with handle.

```python
batch_execute(fail_fast=True, commands=[
# Slider root
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "HealthSlider", "parent": "MainCanvas"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "HealthSlider", "component_type": "Slider"
}},
{"tool": "manage_components", "params": {
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Slider template creates the expected child objects, but it never assigns the Slider’s required references (e.g., fillRect, handleRect, and often targetGraphic). Without these, the slider may not display or update correctly. Consider adding steps (possibly using paths like HealthSlider/Fill Area/Fill and HealthSlider/Handle Slide Area/Handle) to set these properties, or explicitly call out that manual wiring is needed after creation.

Copilot uses AI. Check for mistakes.
Comment on lines +699 to +712
### Create Input Field (TextMeshPro)

```python
batch_execute(fail_fast=True, commands=[
{"tool": "manage_gameobject", "params": {
"action": "create", "name": "NameInput", "parent": "MenuPanel"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput", "component_type": "Image"
}},
{"tool": "manage_components", "params": {
"action": "add", "target": "NameInput",
"component_type": "TMP_InputField"
}},
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For TMP_InputField, creating the child hierarchy isn’t sufficient for a functional input field—the component typically needs references assigned for its text/placeholder/viewport fields (e.g., textComponent, placeholder, textViewport). Consider adding set_property steps to wire these up (using stable paths), or note that these references must be set after creation to avoid a broken control.

Copilot uses AI. Check for mistakes.

### Create Text (TextMeshPro)

TextMeshProUGUI automatically adds a RectTransform when added to a child of a Canvas.
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor accuracy nit: TextMeshProUGUI (and other UGUI components) typically requires a RectTransform regardless of whether the object is already a child of a Canvas; Unity will replace Transform with RectTransform when adding the component. Consider rephrasing to avoid implying it only happens under a Canvas.

Suggested change
TextMeshProUGUI automatically adds a RectTransform when added to a child of a Canvas.
TextMeshProUGUI (like most UGUI components) requires a RectTransform; when you add it, Unity automatically replaces a standard Transform with a RectTransform if needed.

Copilot uses AI. Check for mistakes.
@Scriptwonder Scriptwonder merged commit f9d6f39 into CoplayDev:beta Feb 12, 2026
1 of 2 checks passed
@Scriptwonder Scriptwonder deleted the ui_skill_extension branch February 12, 2026 00:18
@coderabbitai coderabbitai bot mentioned this pull request Feb 24, 2026
4 tasks
msanatan pushed a commit to msanatan/unity-mcp that referenced this pull request Feb 25, 2026
* Update for UI-based batch execution

* Add template notice
msanatan pushed a commit to msanatan/unity-mcp that referenced this pull request Feb 25, 2026
* Update for UI-based batch execution

* Add template notice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants