ワンクリックで
unity-ui
Build and optimize Unity UI with UI Toolkit and UGUI. Masters responsive layouts, event systems, and performance optimization. Use for UI implementation, Canvas optimization, or cross-platform UI challenges.
メニュー
Build and optimize Unity UI with UI Toolkit and UGUI. Masters responsive layouts, event systems, and performance optimization. Use for UI implementation, Canvas optimization, or cross-platform UI challenges.
SOC 職業分類に基づく
Use when you have an existing plan, design, or implemented code that needs adversarial review to find weaknesses, missing edge cases, and unnecessary complexity
Use when you want to autonomously improve a SKILL.md's quality by running iterative experiments. Triggers on "autoresearch 돌려줘", "스킬 품질 올려줘", "이 스킬을 자동으로 개선해줘", "run autoresearch on this skill", or any request to automatically improve a skill's eval pass rate through repeated experimentation. Applies Karpathy's autoresearch technique - fixed-budget iterative loop with single-metric hill-climbing and automatic keep/discard decisions.
Use when a developer needs to choose between two or more approaches during implementation. Triggers on "A vs B?", "should I use X or Y?", "which approach is better?", "Redis or Memcached?", "REST or gRPC?", "single table or split?", or any binary/multi-option technical decision. Use this skill whenever the user is weighing alternatives mid-implementation — even if they don't say "decide", if they're comparing approaches, this skill applies.
Use when creating implementation plans for complex multi-file features or architectural changes that benefit from multiple perspectives before implementation. Use this skill whenever the user asks to plan, design, or architect a feature that touches 3+ files, involves trade-offs between approaches, or would benefit from thinking through risks and requirements before coding. Even if the user says "plan this" without mentioning perspectives, this skill applies.
Multi-AI engineering loop orchestrating Claude, Codex, and Gemini for comprehensive validation. USE WHEN (1) mission-critical features requiring multi-perspective validation, (2) complex architectural decisions needing diverse AI viewpoints, (3) security-sensitive code requiring deep analysis, (4) user explicitly requests multi-AI review or triple-AI loop. DO NOT USE for simple features or single-file changes. MODES - Triple-AI (full coverage), Dual-AI Codex-Claude (security/logic), Dual-AI Gemini-Claude (UX/creativity).
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Codex (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests codex-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
| name | unity-ui |
| description | Build and optimize Unity UI with UI Toolkit and UGUI. Masters responsive layouts, event systems, and performance optimization. Use for UI implementation, Canvas optimization, or cross-platform UI challenges. |
| requires | ["unity-csharp-fundamentals"] |
Unity UI systems covering both UI Toolkit (modern) and UGUI (Canvas-based legacy).
Foundation Required: unity-csharp-fundamentals (TryGetComponent, FindAnyObjectByType, null-safe coding)
Core Topics:
using UnityEngine.UI;
public class UIController : MonoBehaviour
{
[SerializeField] private Button mActionButton;
[SerializeField] private Text mStatusText;
void Start()
{
mActionButton.onClick.AddListener(OnButtonClick);
}
void OnButtonClick()
{
mStatusText.text = "Button clicked!";
}
}
using UnityEngine.UIElements;
public class UIController : MonoBehaviour
{
void OnEnable()
{
UIDocument uiDocument;
if (TryGetComponent(out uiDocument))
{
VisualElement root = uiDocument.rootVisualElement;
Button button = root.Q<Button>("action-button");
button.clicked += OnButtonClick;
}
}
void OnButtonClick()
{
Debug.Log("Button clicked!");
}
}
| Feature | UI Toolkit | UGUI |
|---|---|---|
| Performance | Better | Good |
| Styling | USS (CSS-like) | Inspector |
| Layout | Flexbox | RectTransform |
| Best For | Complex UI, tools | Game UI |
| Learning Curve | Steeper | Easier |
// Separate static and dynamic UI into different canvases
// Static canvas: rarely changes
// Dynamic canvas: updates frequently
// Disable raycasting on non-interactive elements
[SerializeField] private Image mBackground;
void Start()
{
mBackground.raycastTarget = false; // Not clickable
}
// Use CanvasGroup for fade effects (TryGetComponent for null-safe access)
CanvasGroup canvasGroup;
if (panel.TryGetComponent(out canvasGroup))
{
canvasGroup.alpha = 0.5f; // Fade without rebuilding Canvas
}
// Use anchors for responsive design
// Anchor presets: Stretch, Top-Left, Center, etc.
// Canvas Scaler settings (TryGetComponent pattern)
CanvasScaler scaler;
if (TryGetComponent(out scaler))
{
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
scaler.referenceResolution = new Vector2(1920, 1080);
scaler.matchWidthOrHeight = 0.5f; // Balance between width/height
}
Comprehensive UI guide: