Install PuerTS for Unity
它能做什么
这项技能指导把 PuerTS 包安装到 Unity 项目中。适合希望在游戏或应用中运行 JavaScript 或 TypeScript 的 Unity 开发者。
适用场景
- ✓当你想把 PuerTS 添加到 Unity 项目中时。
- ✓当你需要选择合适的 PuerTS 版本及其包时。
- ✓当你想从发布压缩包或 git 链接安装 PuerTS 时。
技能链接
https://github.com/Tencent/puerts/blob/master/unity/skills/install-puerts-for-unity/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把 PuerTS 3.0.2 版本安装到我的 Unity 项目中,并包含 Node.js 包。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会先询问你想要的版本,找到该版本的发布压缩包,并说明依赖关系。然后它会指导你通过下载或 git URL 安装这些包,并在需要时设置 Editor Assistant。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Install PuerTS for Unity
This skill guides you through downloading and installing PuerTS packages into a Unity project.
⚠️ Important: Always ask the user which PuerTS version they want to install if they haven't specified one. The version number follows the Core package's version (e.g.,
3.0.2).
1. Release Page & Version
- The release download page URL pattern is:
For example:https://github.com/Tencent/puerts/releases/tag/Unity_v{VERSION}https://github.com/Tencent/puerts/releases/tag/Unity_v3.0.2
⚠️ Important — Version Numbers Inside Archives: The version number in the release page URL (e.g.,
Unity_v3.0.2) is based on the Core package version. However, the version numbers inside each.tar.gzfilename may differ — each package follows its own versioning cadence. You may need to download/parse the release page HTML to determine the exact filenames available.
2. Available Packages
Each release page may contain the following .tar.gz archives, each corresponding to a UPM package:
| Archive File | UPM Package | Has Native Plugins | Always Available |
|---|---|---|---|
PuerTS_Core_{ver}.tar.gz |
com.tencent.puerts.core |
✅ Yes | ✅ Yes |
PuerTS_Lua_{ver}.tar.gz |
com.tencent.puerts.lua |
✅ Yes | ✅ Yes |
PuerTS_Nodejs_{ver}.tar.gz |
com.tencent.puerts.nodejs |
✅ Yes | ✅ Yes |
PuerTS_Python_{ver}.tar.gz |
com.tencent.puerts.python |
✅ Yes | ✅ Yes |
PuerTS_Quickjs_{ver}.tar.gz |
com.tencent.puerts.quickjs |
✅ Yes | ✅ Yes |
PuerTS_V8_{ver}.tar.gz |
com.tencent.puerts.v8 |
✅ Yes | ✅ Yes |
PuerTS_Webgl_{ver}.tar.gz |
com.tencent.puerts.webgl |
❌ No | ✅ Yes |
PuerTS_Agent_{ver}.tar.gz |
com.tencent.puerts.agent |
❌ No | ❌ Not every release |
PuerTS_MCP_{ver}.tar.gz |
com.tencent.puerts.mcp |
❌ No | ❌ Not every release |
Notable Package Features
com.tencent.puerts.agent: Provides an Agent framework for building LLM agents, and also includes an Agent-based Editor Assistant for Unity.com.tencent.puerts.mcp: Provides an MCP (Model Context Protocol) framework, and also includes an MCP-based Editor Assistant for Unity.
Both the
agentandmcppackages offer an Editor Assistant variant. See Section 5 for how to handle user requests like "install PuerTS Editor Assistant".
3. Package Dependencies
⚠️ Important: Packages have dependency relationships. When a user requests to install a package, you must ensure all of its dependencies are also installed.
Dependency Rules
com.tencent.puerts.coreis the foundational package — all other packages depend on it.com.tencent.puerts.agentdepends oncom.tencent.puerts.core+com.tencent.puerts.v8com.tencent.puerts.mcpdepends oncom.tencent.puerts.core+com.tencent.puerts.v8+com.tencent.puerts.agent- All backend packages (
com.tencent.puerts.v8,com.tencent.puerts.lua,com.tencent.puerts.nodejs,com.tencent.puerts.python,com.tencent.puerts.quickjs,com.tencent.puerts.webgl) depend oncom.tencent.puerts.core
Dependency Graph
com.tencent.puerts.core (required by all)
├── com.tencent.puerts.v8
│ ├── com.tencent.puerts.agent
│ │ └── com.tencent.puerts.mcp
│ └── com.tencent.puerts.mcp
├── com.tencent.puerts.nodejs
├── com.tencent.puerts.lua
├── com.tencent.puerts.python
├── com.tencent.puerts.quickjs
└── com.tencent.puerts.webgl
Examples of Automatic Dependency Resolution
| User requests to install | Must also install |
|---|---|
agent |
core, v8 |
mcp |
core, v8, agent |
mcp + agent |
core, v8 |
v8 |
core |
lua |
core |
4. Installation Methods
4.1 Download & Extract Method (Required for packages with native plugins)
The following packages contain compiled native binary plugins and must be installed by downloading from the release page:
com.tencent.puerts.corecom.tencent.puerts.luacom.tencent.puerts.nodejscom.tencent.puerts.pythoncom.tencent.puerts.quickjscom.tencent.puerts.v8
Steps:
- Go to
https://github.com/Tencent/puerts/releases/tag/Unity_v{VERSION} - Download the required
.tar.gzfile(s) (e.g.,PuerTS_Core_3.0.2.tar.gz) - Extract the archive — it will produce a directory (e.g.,
core/) co
常见问题
它会询问我要哪个版本吗?
会。如果你没有给出版本,技能会询问。
这些包如何安装?
技能可以从下载的压缩包或 git URL 安装。
版本号以哪个包为准?
版本号与 Core 包保持一致。
详情
作者的原始描述
Guide for downloading and installing PuerTS UPM packages into a Unity project — covers version selection, package dependencies, download/extract and git URL installation methods, and Editor Assistant setup.
repo: Tencent/puerts
热度
- GitHub 星标
- 6.3k
- 排名
- #14377
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …