You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`packages.screenCapture`| bool |`com.unity.modules.screencapture` enabled (ScreenCapture API for screenshots) |
41
38
42
39
**Key decision points:**
43
40
44
-
-**UI system**: If `packages.uiToolkit` is true (always for Unity 2021+), use `manage_ui` for UI Toolkit workflows (UXML/USS). If `packages.ugui` is true, use Canvas + uGUI components via `batch_execute`. UI Toolkit is preferred for new UI — it uses a frontend-like workflow (UXML for structure, USS for styling).
41
+
-**UI system**: If `packages.ugui` is true, use Canvas + uGUI components. UI Toolkit (UIDocument/UXML) is built-in since Unity 2021+ but has no MCP tool support yet.
45
42
-**Text**: If `packages.textmeshpro` is true, use `TextMeshProUGUI` instead of legacy `Text`.
46
43
-**Input**: Use `activeInputHandler` to decide EventSystem module — `StandaloneInputModule` (Old) vs `InputSystemUIInputModule` (New). See [workflows.md — Input System](workflows.md#input-system-old-vs-new).
47
44
-**Shaders**: Use `renderPipeline` to pick correct shader names — `Standard` (BuiltIn) vs `Universal Render Pipeline/Lit` (URP) vs `HDRP/Lit` (HDRP).
@@ -586,76 +583,6 @@ manage_texture(
586
583
587
584
---
588
585
589
-
## UI Tools
590
-
591
-
### manage_ui
592
-
593
-
Manage Unity UI Toolkit elements: UXML documents, USS stylesheets, UIDocument components, and visual tree inspection.
Unity has two UI systems: **UI Toolkit** (modern, recommended) and **uGUI** (Canvas-based, legacy). Use `manage_ui` for UI Toolkit workflows, and `batch_execute` with `manage_gameobject` + `manage_components` for uGUI.
564
+
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.
565
565
566
566
> **Template warning:** This section is a skill template library, not a guaranteed source of truth. Examples may be inaccurate for your Unity version, package setup, or project conventions.
567
567
> **Use safely:**
@@ -582,9 +582,7 @@ Unity has two UI systems: **UI Toolkit** (modern, recommended) and **uGUI** (Can
|`activeInputHandler`|`"Old"`|`StandaloneInputModule` for EventSystem (uGUI) |
601
-
|`activeInputHandler`|`"New"`|`InputSystemUIInputModule` for EventSystem (uGUI) |
597
+
|`activeInputHandler`|`"Old"`|`StandaloneInputModule` for EventSystem |
598
+
|`activeInputHandler`|`"New"`|`InputSystemUIInputModule` for EventSystem |
602
599
|`activeInputHandler`|`"Both"`| Either works; prefer `InputSystemUIInputModule` for UI |
603
600
604
-
### UI Toolkit Workflows (manage_ui)
605
-
606
-
UI Toolkit uses a web-like approach: **UXML** (like HTML) for structure, **USS** (like CSS) for styling. This is the preferred UI system for new projects.
The sections below cover legacy Canvas-based UI using `batch_execute`. Use these when working with existing uGUI projects or when UI Toolkit is not suitable.
705
-
706
601
### RectTransform Sizing (Critical for All UI Children)
707
602
708
603
Every GameObject under a Canvas gets a `RectTransform` instead of `Transform`. **Without setting anchor/size, UI elements default to zero size and won't be visible.** Use `set_property` on `RectTransform`:
0 commit comments