据 AlphaMoat 统计,截至 2026-09,Unity 累计下载 3,823 次、获 5 个星标,在全部 5,078 个 AI 技能中排名第 2,751 位,在「开发编程」分类(577 个)中排名第 359 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 90 | 3,012 | 3 | - |
| SkillHub ↗ | 368 | 3,823 | 5 | — |
各平台的计数口径不同,统计时间不一致。
避免常见的Unity错误——生命周期顺序、GetComponent缓存、物理时机及Unity假null问题
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 3,823 | — | 5 |
| 2026-08 | 3,000 | +10.5% | 4 |
| 2026-07 | 2,716 | +12.5% | 4 |
| 2026-06 | 2,414 | +7.1% | 3 |
| 2026-05 | 2,253 | — | 3 |
| 2026-03 | 1,731 | — | 3 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: Unity
description: Avoid common Unity mistakes — lifecycle ordering, GetComponent caching, physics timing, and Unity's fake null.
metadata: {"clawdbot":{"emoji":"🎮","os":["linux","darwin","win32"]}}
---
## Lifecycle Order
- `Awake` before `Start` — use Awake for self-init, Start for cross-references
- `OnEnable` called before `Start` — but after `Awake`
- Order between scripts not guaranteed — use Script Execution Order if needed- `Awake` called even if disabled — `Start` only when enabled
## GetComponent Performance
- `GetComponent` every frame is slow — cache in `Awake` or `Start`
- `GetComponentInChildren` searches recursively — expensive on deep hierarchies
- `TryGetComponent` returns bool — avoids null check, slightly faster
- Use `RequireComponent` attribute — ensures dependency, documents requirement
## Physics Timing
- Physics in `FixedUpdate`, not `Update` — consistent regardless of framerate
- `FixedUpdate` can run 0 or multiple times per frame — don't assume 1:1
- `Rigidbody.MovePosition` in FixedUpdate — `transform.position` bypasses physics
- `Time.deltaTime` in Update, `Time.fixedDeltaTime` in FixedUpdate — or just use deltaTime
## Unity's Fake Null
- Destroyed objects aren't truly null — `== null` returns true, but object exists
- Null-conditional `?.` doesn't work properly — use `== null` or `bool` conversion
- `Destroy` doesn't happen immediately — object gone next frame
- Use `DestroyImmediate` only in editor — causes issues in builds
## Coroutines
- `StartCoroutine` needs MonoBehaviour active — disabled/destroyed stops coroutines
- `yield return null` waits one frame — `yield return new WaitForSeconds(1)` for time
- `StopCoroutine` needs same method or Coroutine reference — string overload unreliable
- Can't return values — use callbacks or set field in coroutine
## Instantiate and Pooling
- `Instantiate` is expensive — pool frequently created/destroyed objects
- `Instantiate(prefab, parent)` sets parent — avoids extra SetParent call
- `SetActive(false)` before returning to pool — not Destroy
- Pool inactive objects under a parent — keeps hierarchy clean
## Serialization
- `[SerializeField]` for private fields in inspector — prefer over public
- `public` fields auto-serialize — but exposes API you may not want
- `[HideInInspector]` hides but still serializes — `[NonSerialized]` to skip entirely
- Serialized fields keep inspector values — code defaults ignored after first serialize
## ScriptableObjects
- Data containers that live as assets — share between scenes/prefabs
- `CreateAssetMenu` attribute for easy creation — right-click → Create
- Don't modify at runtime in builds — changes not saved (except in editor)
- Great for config, item databases — reduces prefab duplication
## Common Mistakes
- `Find` methods every frame — cache references
- String comparisons for tags — use `CompareTag("Enemy")`, not `tag == "Enemy"`
- Physics queries allocate — use `NonAlloc` variants: `RaycastNonAlloc`
- UI anchors wrong — stretches unexpectedly on different resolutions
- `async/await` without context — use UniTask or careful error handling
使用 gh CLI 与 GitHub 交互,通过 gh issue、gh pr、gh run 和 gh api 管理议题、PR、CI 运行及高级查询。
Multi search engine integration with 16 engines (7 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and Wolfra...
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
生成有效的 Mermaid 图表,如流程图、时序图、思维导图、ER 图、用户旅程等。
通过托管 OAuth 集成 YouTube DataAPI,支持视频搜索、播放列表管理、频道数据访问及评论互动。当用户需要与 YouTube 交互时使用本技能。其他第三方应用请使用 api-gateway 技能(https://clawhub.ai/byungkyu/api-gateway)。
GitHub API integration with managed OAuth. Access repositories, issues, pull requests, commits, branches, and users. Use this skill when users want to interact with GitHub repositories, manage issues and PRs, search code, or automate workflows. For other third party apps, use the api-gateway skill (
覆盖规划、实现、验证与测试的编码工作流技能。
核心 Docker 命令和工作流程,包括容器管理、镜像操作和调试。
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
创建、检查和编辑 Microsoft PowerPoint 演示文稿及 PPTX 文件,支持可靠的布局、模板、占位符、备注、图表和视觉质检。使用...
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。