unity-ui-procedural
Advanced UI construction using C# code instead of UI Builder. Includes fluent extension methods and reusable pointer manipulators.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Advanced UI construction using C# code instead of UI Builder. Includes fluent extension methods and reusable pointer manipulators.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Factory pattern for creating families of related objects. Supports both ScriptableObject composition and simple prefab instantiation.
Manage project boundaries using Assembly Definitions (.asmdef) for faster compile times and modular architecture. Based on the patterns by Adam Myhre. Enforces responsibility-based organization and handles Runtime/Editor/Tests splits.
Step-by-step object construction using fluent interfaces. Simplifies complex GameObject setup.
Professional Unity C# Code Reviewer. Detects anti-patterns, performance leaks, and enforces project-specific architecture.
Encapsulate actions as objects for queuing, undo/redo, and async execution.
Implements "Composition over Inheritance" using ScriptableObject configs and C# Tuples. Replaces deep class hierarchies with modular, has-a relationships.
| name | unity-ui-procedural |
| description | Advanced UI construction using C# code instead of UI Builder. Includes fluent extension methods and reusable pointer manipulators. |
Build lightning-fast, highly dynamic user interfaces entirely through code. This skill enables the "Logic-First" UI workflow, perfect for complex systems like inventories, tooltips, and dynamic HUDs.
.CreateChild<T>() and .WithClass() to build UI trees that read like documentation.Manipulator API.UIToolkitExtensions.cs.txt: Generic methods for chaining element creation and styling.DragManipulator.cs.txt: A cross-platform pointer-based drag system for any VisualElement.ProceduralViewExample.cs.txt: A "Hotbar/Inventory" demo showing the power of the fluent syntax.var root = GetComponent<UIDocument>().rootVisualElement;
root.CreateChild<VisualElement>( "main-menu" )
.WithClass( "menu--active" )
.CreateChild<Button>( "menu__btn--start" )
.text = "Start Game";
var window = root.Q( "inventory-window" );
window.AddManipulator( new DragManipulator() );
Always use USS classes for styling even when building procedurally. Avoid setting .style.width or colors directly in C# unless it is for dynamic calculations (like health bars).