能力标签
PromptUGUI
🛠
AI工具

PromptUGUI

基于 C# · 开源免费,本地部署,数据完全自主可控
⭐ 8 Stars 💻 C# 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
unityui-frameworkc#
✦ AI Skill Hub 推荐

PromptUGUI 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

PromptUGUI 是一款基于 C# 的开源工具,在 GitHub 上收获 0k+ Star,是unity、ui-framework、c#领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
PromptUGUI 依赖 C# 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 C# 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 PromptUGUI 的版本更新,及时通知重要功能变化。

📋 工具概览

基于LLM的Unity uGUI开发解决方案

PromptUGUI 是一款基于 C# 开发的开源工具,专注于 unity、ui-framework、c# 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 8
开发语言
C#
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.5 分
工具类型
AI工具
Forks

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

基于LLM的Unity uGUI开发解决方案

PromptUGUI 是一款基于 C# 开发的开源工具,专注于 unity、ui-framework、c# 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/Heerozh/PromptUGUI
cd PromptUGUI

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
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"
📑 README 深度解析 真实文档 完整度 56/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

PromptUGUI

English | 中文

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.

Features

  • Minimal XML description language, tailored to how LLMs write
  • Hot reload — edit, save, see the result instantly
  • Reactive UI support
  • Automatic XSD schema validation + built-in syntax-check CLI
  • Highly extensible — supports Templates / Prefab templates
  • Automatic sprite / icon resolution
  • Configure a SpriteSet, then reference icons in XML via <Icon name="solar:Forward" /> or <Image sprite="ui:dialog" />
  • Only the sprites actually used are bundled
  • LLMs handle this style of authoring extremely well
  • Fully automated i18n
  • Auto-extracts UI text plus strings wrapped with UI.Tr() in C# code
  • Sends the strings (with surrounding context) to any OpenAI-compatible model for translation; source text may freely mix languages
  • Authors can annotate strings whose translation is inaccurate — the annotation is included as context on the next run
  • Addressables-backed on-demand download / hot update
  • Sprite sets and locale files can be downloaded on demand by Label
  • .ui.xml files can be dragged into the Inspector as an Addressable Reference
  • Offset-based animation system
  • Simple syntax, implemented on LitMotion
  • Animates relative offsets — anchor and parent/child layout don't interfere, ideal for dynamic UI
  • Triggers are extensible to Sound / Particle and beyond
  • Full-featured modal dialog system
  • Async, blocking-style call site: var result = await MessageBox.Open(...)
  • Concurrent calls are queued so dialogs never collide
  • Subclass for highly customized dialogs

功能特性

  • 极简的XML描述语言,符合大模型习惯
  • 支持热重载,改完立刻反馈
  • 支持响应式UI
  • 自动XSD Schema语法检查 + 内置语法检查 CLI
  • 高扩展性,允许模板/Prefab模板
  • 自动sprite/icon引用
  • 可配置SpriteSet,后xml里用<Icon name="solar:Forward" /><Image sprite="ui:dialog" />引用
  • 只打包用到的
  • 大模型极其擅长此种方式
  • 全自动多国语言系统
  • 自动提取界面文本,以及代码中UI.Tr()包裹的字符串
  • 自动携带上下文交给OpenAI兼容的模型自动翻译,原文可任意语言混写
  • 对于翻译不准确的内容,用户可在文字上添加注释,会携带到上下文
  • Addressable随需下载/热更支持
  • Sprite集和多国语言可按Label方式随需下载
  • UI XML可以作为Addressable Reference直接拖入
  • Offset-based动画系统
  • 语法简单,LitMotion实现
  • 基于offset,不受锚点/父子关系影响,适合动态UI
  • Trigger支持扩展为Sound/Particle等更多功能
  • 完善的 Model 模态对话框系统
  • 异步堵塞式书写方便: var result = await MessageBox.Open(...)
  • 多次调用通过队列依次弹出避免冲突
  • 可继承实现高度自定义的对话框

Install / Upgrade

Manual install

  1. Prerequisites:

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.

安装/升级方法

手动安装:

  1. Prerequisite:

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.

Usage

Example

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);
    }

---

使用方法

2. Configure fonts and localization (optional)

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.

2. 设置字体和多国语言 (可选)

Project 右键 → Create → PromptUGUI → Settings,设置有哪些字体Type (font="NormalText"使用的就是Type名) ,以及需要哪些语言。

设置好即可,以后一键翻译会自动提取界面文本和代码中UI.Tr()包裹的字符串。

🎯 aiskill88 AI 点评 A 级 2026-05-31

创新性的Unity uGUI开发解决方案

📚 实用指南(长尾问题)
适合谁
  • 需要 PromptUGUI 解决具体问题的开发者与运营人员
最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
PromptUGUI 中文教程PromptUGUI 安装报错怎么办PromptUGUI 与同类工具对比PromptUGUI 最佳实践PromptUGUI 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要 PromptUGUI 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

PromptUGUI 是一款C#开发的AI辅助工具。开源AI工具:A solution that enables Unity 6+ uGUI development through LLM.。⭐8 · C# 主要应用场景包括:Unity开发。
💡 AI Skill Hub 点评

经综合评估,PromptUGUI 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 PromptUGUI
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 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#
🔗 原始来源
🐙 GitHub 仓库  https://github.com/Heerozh/PromptUGUI

收录时间:2026-05-31 · 更新时间:2026-06-01 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。