PromptUGUI 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
基于LLM的Unity uGUI开发解决方案
PromptUGUI 是一款基于 C# 开发的开源工具,专注于 unity、ui-framework、c# 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
基于LLM的Unity uGUI开发解决方案
PromptUGUI 是一款基于 C# 开发的开源工具,专注于 unity、ui-framework、c# 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/Heerozh/PromptUGUI cd PromptUGUI # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 promptugui --help # 基本运行 promptugui [options] <input> # 详细使用说明请查阅文档 # https://github.com/Heerozh/PromptUGUI
# promptugui 配置说明 # 查看配置选项 promptugui --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export PROMPTUGUI_CONFIG="/path/to/config.yml"
A solution that enables Unity 6+ UI development through LLM.
It provides an extremely concise UI description language .ui.xml and a runtime parser that translates it into a uGUI hierarchy.
More flexible than UI Toolkit, easier for custom styling, and tightly integrated with the GameObject system.
<Icon name="solar:Forward" /> or <Image sprite="ui:dialog" />UI.Tr() in C# code.ui.xml files can be dragged into the Inspector as an Addressable Referencevar result = await MessageBox.Open(...)<Icon name="solar:Forward" />或<Image sprite="ui:dialog" />引用UI.Tr()包裹的字符串var result = await MessageBox.Open(...)Install DotNet SDK 10: https://dotnet.microsoft.com/zh-cn/download
Install NuGetForUnity: https://github.com/GlitchEnzo/NuGetForUnity
Install R3: https://github.com/Cysharp/R3
Install LitMotion: https://github.com/annulusgames/LitMotion.git
1. UPM Window > Package Manager > "+" > "Add package from git URL" > Enter:
https://github.com/heerozh/PromptUGUI.git
2. Skills Copy the three skill folders under the package's .claude/skills/ directory into your project's agent skills directory: Claude Code: <project root>/.claude/skills/ Codex: <project root>/.agents/skills/
Skill files follow the open Agent Skills specification, so compatible platforms (Codex / Gemini CLI / etc.) can reuse them — just drop them into that platform's skill directory.
3. AGENT.md / CLAUDE.md Add this to your project-wide system prompt:
Use `PromptUGUI.Application` namespace's `UI.Tr("...")` to wrap all player-facing text for i18n.
Install DotNet SDK 10: https://dotnet.microsoft.com/zh-cn/download
Install NuGetForUnity: https://github.com/GlitchEnzo/NuGetForUnity
Install R3: https://github.com/Cysharp/R3
Install LitMotion: https://github.com/annulusgames/LitMotion.git
1. UPM Window > Package Manager > "+" > "Add package from git URL" > Enter:
https://github.com/heerozh/PromptUGUI.git
2. Skills 把包内的 .claude/skills/ 目录下的三个 skill 目录 copy 到你项目对应agent的skills目录下 Claude Code: <project root>/.claude/skills/ Codex: <project root>/.agents/skills/
Skill 文件遵循开放 Agent Skills 规范,兼容平台(Codex / Gemini CLI 等)也可复用,只需放到对应平台的 skill 目录。
3. AGENT.md / CLAUDE.md 把以下内容写到项目全局提示词:
Use `PromptUGUI.Application` namespace's `UI.Tr("...")` to wrap all player-facing text for i18n.
write a normal login ui use promptugui, with Login.cs monobehavior script open it.
<img src="https://github.com/Heerozh/PromptUGUI/blob/media/example.png" width="394" height="497"/>
Response:
Searched for 1 pattern, read 3 files, listed 6 directories (ctrl+o to expand)
● I'll explore the PromptUGUI conventions first by invoking the relevant skills.
● Skill(authoring-promptugui-xml)
⎿ Successfully loaded skill
● Skill(scripting-promptugui-csharp)
⎿ Successfully loaded skill
...
● Clean compile. Let me complete the task tracking and summarize.
● Created two files:
Assets/Resources/UI/Login.ui.xml — login screen with title/subtitle, username + password fields (password masked via
contentType="password"), "Remember me" toggle, "Forgot password?" link, primary Login button, and a "Sign up" footer.
Uses reference="1920x1080" with a reference.portrait="1080x1920" override so it scales sensibly on both PC and mobile.
Assets/Scripts/Login.cs — MonoBehaviour that:
1. Sets up UseResourcesResolver("UI"), loads Login.ui, opens the screen in Start.
2. Tracks _username / _password / _rememberMe via R3 OnValueChanged subscriptions (InputField has setter-only
TextValue, so caching latest values via R3 is the idiomatic way).
3. Wires the three buttons (login / forgot / register) to handlers that pop a MessageBox for feedback. Player-facing
strings are wrapped in UI.Tr(...) per the project's i18n convention; XML source text is auto-extracted as msgid (no
wrapping needed there).
To use it: drop the Login script onto an empty GameObject in your scene and hit Play.
Validation: xmllint passes against Assets/PromptUGUI.gen.xsd; Unity recompile is clean.
✻ Worked for 8m 22s
XML Code:
<?xml version="1.0" encoding="utf-8"?>
<PromptUGUI version="1">
<Screen name="Login" reference="1920x1080" reference.portrait="1080x1920">
<Image anchor="stretch" color="#1E2433"/>
<Frame id="card" anchor="center" size="420x600">
<Image anchor="stretch" color="#FFFFFF"/>
<VStack anchor="stretch" margin="32" spacing="14">
<Text fontSize="30" align="center" color="#111827">Welcome Back</Text>
<Text fontSize="14" align="center" color="#6B7280">Sign in to your account</Text>
<Frame height="16"/>
<Text fontSize="14" color="#374151">Username</Text>
<InputField id="username" placeholder="Enter your username"
width="stretch" height="40"/>
<Frame height="4"/>
<Text fontSize="14" color="#374151">Password</Text>
<InputField id="password" placeholder="Enter your password"
contentType="password"
width="stretch" height="40"/>
<HStack height="28" spacing="8">
<Toggle id="rememberMe">Remember me</Toggle>
<Frame width="stretch"/>
<Btn id="forgot" color="#FFFFFF00">
<Text anchor="stretch" align="center" fontSize="13" color="#3B82F6">Forgot password?</Text>
</Btn>
</HStack>
<Frame height="8"/>
<Btn id="login" color="#3B82F6" width="stretch" height="44">
<Text anchor="stretch" align="center" fontSize="16" color="#FFFFFF">Login</Text>
</Btn>
<HStack height="24" spacing="4" childAlign="middle-center">
<Text fontSize="13" color="#6B7280">No account?</Text>
<Btn id="register" color="#FFFFFF00">
<Text anchor="stretch" align="center" fontSize="13" color="#3B82F6">Sign up</Text>
</Btn>
</HStack>
</VStack>
</Frame>
</Screen>
</PromptUGUI>
C# Code:
private async void Start()
{
UI.UseResourcesResolver("UI");
await UI.LoadDocumentAsync("Login.ui");
var screen = UI.Open("Login");
screen.Get<InputField>("username").OnValueChanged
.Subscribe(v => _username = v).AddTo(screen);
screen.Get<InputField>("password").OnValueChanged
.Subscribe(v => _password = v).AddTo(screen);
screen.Get<Toggle>("rememberMe").OnValueChanged
.Subscribe(v => _rememberMe = v).AddTo(screen);
screen.Get<Btn>("login").OnClick
.Subscribe(_ => OnLoginClicked()).AddTo(screen);
screen.Get<Btn>("forgot").OnClick
.Subscribe(_ => OnForgotClicked()).AddTo(screen);
screen.Get<Btn>("register").OnClick
.Subscribe(_ => OnRegisterClicked()).AddTo(screen);
}
private async void OnLoginClicked()
{
if (string.IsNullOrWhiteSpace(_username) || string.IsNullOrWhiteSpace(_password))
{
await MessageBox.Open(
UI.Tr("Please enter both username and password."), MsgBtn.OK);
return;
}
Debug.Log($"[Login] user={_username} remember={_rememberMe}");
await MessageBox.Open(UI.Tr("Welcome back!"), MsgBtn.OK);
}
---
Project window → right-click → Create → PromptUGUI → Settings. Configure the font Types (font="NormalText" refers to the Type name) and the languages you want to support.
Once configured, one-click translation will auto-extract UI text and any UI.Tr()-wrapped string in your code.
Recommended: use Addressables. Click the menu item Setup Addressable for Locale ... and the i18n folder can move out of Resources to any directory. After UI.Locale.UseAddressableResolver();, UI.Locale.SetToSystemDefault("en"); will download the chosen language in the background and refresh the UI when it finishes.
Project 右键 → Create → PromptUGUI → Settings,设置有哪些字体Type (font="NormalText"使用的就是Type名) ,以及需要哪些语言。
设置好即可,以后一键翻译会自动提取界面文本和代码中UI.Tr()包裹的字符串。
创新性的Unity uGUI开发解决方案
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,PromptUGUI 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | PromptUGUI |
| 原始描述 | 开源AI工具:A solution that enables Unity 6+ uGUI development through LLM.。⭐8 · C# |
| Topics | unityui-frameworkc# |
| GitHub | https://github.com/Heerozh/PromptUGUI |
| License | Apache-2.0 |
| 语言 | C# |
收录时间:2026-05-31 · 更新时间:2026-06-01 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。