Skip to content
Back to search

Unity-Skills

Unity Skills

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/861172923--unity-skills/badge.svg)](/listings/861172923--unity-skills)

HTML

<a href="/listings/861172923--unity-skills"><img src="/api/listings/861172923--unity-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 162 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Unity Skills
  2. Unity Editor AI 助手技能库 - 通过 JSON 命令文件控制 Unity 编辑器
  3. ## 项目简介
  4. Unity Skills 是一个为 AI 助手设计的 Unity 编辑器控制系统。通过生成标准化的 JSON 命令文件,AI 可以自动化执行各种 Unity 编辑器操作,包括场景管理、GameObject 创建、组件配置、材质设置等。
  5. ## 作者信息
  6. **Cool 浩**
  7. - B站主页: [https://space.bilibili.com/228962838](https://space.bilibili.com/228962838?spm_id_from=333.1007.0.0)
  8. - 演示视频: [Unity Skills 演示](https://www.bilibili.com/video/BV1HAkwB7ED2/?spm_id_from=333.1387.upload.video_card.click)
  9. ## 工作原理
  10. AI 助手通过以下流程与 Unity 编辑器交互:
  11. 1. **理解用户需求** - 解析用户的自然语言指令
  12. 2. **生成命令 JSON** - 根据需求生成标准化的命令文件
  13. 3. **写入待处理队列** - 将命令写入 `UnityCommands/pending/{id}.json`
  14. 4. **Unity 执行命令** - Unity 编辑器监听并执行命令
  15. 5. **返回结果** - 执行结果写入 `UnityCommands/results/{id}.json`
  16. ## 技能分类
  17. 本仓库包含以下 Unity 操作技能:
  18. | 技能文件 | 说明 |
  19. |---------|------|
  20. | [unity.md](skills/unity.md) | 综合命令入口和导航 |
  21. | [unity-gameobject.md](skills/unity-gameobject.md) | GameObject 创建、删除、查询 |
  22. | [unity-component.md](skills/unity-component.md) | 组件添加和属性设置 |
  23. | [unity-scene.md](skills/unity-scene.md) | 场景管理(新建/保存/加载) |
  24. | [unity-prefab.md](skills/unity-prefab.md) | Prefab 预制体操作 |
  25. | [unity-asset.md](skills/unity-asset.md) | 资源管理和导入 |
  26. | [unity-material.md](skills/unity-material.md) | 材质和 Shader 设置 |
  27. | [unity-light.md](skills/unity-light.md) | 灯光创建和配置 |
  28. | [unity-animator.md](skills/unity-animator.md) | 动画控制器管理 |
  29. | [unity-ui.md](skills/unity-ui.md) | UI 元素创建和设置 |
  30. | [unity-editor.md](skills/unity-editor.md) | 编辑器控制(播放/暂停等) |
  31. | [unity-debug.md](skills/unity-debug.md) | 调试工具 |
  32. | [unity-project.md](skills/unity-project.md) | 项目管理 |
  33. | [unity-validation.md](skills/unity-validation.md) | 验证工具 |
  34. ## 命令格式
  35. 所有命令遵循统一的 JSON 格式:
  36. ```json
  37. {
  38. "id": "随机8位ID",
  39. "type": "命令类型",
  40. "timestamp": "ISO时间戳",
  41. "parameters": {
  42. // 命令特定参数
  43. }
  44. }
  45. ```
  46. ## 使用示例
  47. ### 示例 1: 创建一个立方体
  48. ```json
  49. {
  50. "id": "abc12345",
  51. "type": "CreateGameObject",
  52. "timestamp": "2026-01-19T10:30:00Z",
  53. "parameters": {
  54. "name": "MyCube",
  55. "primitiveType": "cube"
  56. }
  57. }
  58. ```
  59. ### 示例 2: 添加刚体组件
  60. ```json
  61. {
  62. "id": "def67890",
  63. "type": "AddComponent",
  64. "timestamp": "2026-01-19T10:30:01Z",
  65. "parameters": {
  66. "target": "MyCube",
  67. "componentType": "Rigidbody"
  68. }
  69. }
  70. ```
  71. ### 示例 3: 创建并应用材质
  72. ```json
  73. {
  74. "id": "ghi11111",
  75. "type": "CreateMaterial",
  76. "timestamp": "2026-01-19T10:30:02Z",
  77. "parameters": {
  78. "name": "RedMaterial",
  79. "folder": "Assets/Materials",
  80. "shader": "Standard",
  81. "color": "#FF0000"
  82. }
  83. }
  84. ```
  85. ```json
  86. {
  87. "id": "jkl22222",
  88. "type": "SetMaterial",
  89. "timestamp": "2026-01-19T10:30:03Z",
  90. "parameters": {
  91. "target": "MyCube",
  92. "material": "Assets/Materials/RedMaterial.mat"
  93. }
  94. }
  95. ```
  96. ## 快速开始
  97. ### 对于 AI 助手开发者
  98. 1. 克隆本仓库
  99. 2. 将 `skills/` 目录配置到 AI 助手的技能路径
  100. 3. 配置 AI 读取 `CLAUDE.md` 获取使用说明
  101. 4. 实现命令文件的写入和结果读取逻辑
  102. ### 对于 Unity 开发者
  103. 1. 在 Unity 项目中实现命令监听器
  104. 2. 监听 `UnityCommands/pending/` 目录
  105. 3. 解析并执行 JSON 命令
  106. 4. 将结果写入 `UnityCommands/results/` 目录
  107. ## 支持的命令类型
  108. - **GameObject 操作**: CreateGameObject, DeleteGameObject, SetTransform, SetParent, SetActive
  109. - **组件管理**: AddComponent, SetComponentProperty
  110. - **场景管理**: Scene (new/save/load/saveas)
  111. - **资源管理**: CreateMaterial, SetMaterial, CreatePrefab
  112. - **灯光系统**: Light (create/set)
  113. - **动画系统**: Animator (createcontroller/addparameter/setparameter/play)
  114. - **UI 系统**: UI (create/set)
  115. - **查询操作**: GetSceneInfo, GetGameObjectInfo
  116. ## 许可证
  117. 本项目采用 [Apache License 2.0](LICENSE) 许可证。
  118. ## 贡献
  119. 欢迎提交 Issue 和 Pull Request 来改进技能定义和文档。
  120. ## 相关项目
  121. - Unity Editor - https://unity.com/
  122. - Claude AI - https://claude.ai/
  123. ---
  124. **注意**: 本项目需要配合支持文件系统操作的 AI 助手和相应的 Unity 编辑器插件使用。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.