Iván

Unity

Developmentv1.0.0
By IvánUpdated 2026-05-11unity@clawhub_ivangdavila/unity
Code GenerationBug Fixing

According to AlphaMoat, as of 2026-09, Unity has 3,823 downloads and 5 stars — ranked #2,751 of 5,078 AI skills overall, and #359 of 577 in Development.

Installs
368
Downloads
3.8K
Stars
5
Overall Rank
#2,751
Top 55% overall · Top 63% in Development
PlatformInstallsDownloadsStarsComments
ClawHub ↗903.0K3-
SkillHub ↗3683.8K5—

Platforms count differently and update at different times.

What this skill does

The notes cover component-reference caching, initialization order, physics-update timing, destroyed-object null behavior, coroutines, pooling, serialization and ScriptableObjects. Use them as a review checklist against the actual project and Unity behavior, rather than as evidence that code has been tested or optimized.

Profile published 2026-10-27

What you can do with it

  • Review Unity scripts for lifecycle and allocation issues

When to use it

  • When checking gameplay code, physics timing or object reuse

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Review this Unity script for initialization, repeated component lookup, physics timing and destroyed-object checks.

Monthly Trend

Downloads3.8K
1.6K2.8K4.0K2026-03 · Downloads 1.7K2026-05 · Downloads 2.3K2026-06 · Downloads 2.4K2026-07 · Downloads 2.7K2026-08 · Downloads 3.0K2026-09 · Downloads 3.8K26-0326-09
Stars5
3452026-03 · Stars 32026-05 · Stars 32026-06 · Stars 32026-07 · Stars 42026-08 · Stars 42026-09 · Stars 526-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.8K—5
2026-083.0K+10.5%4
2026-072.7K+12.5%4
2026-062.4K+7.1%3
2026-052.3K—3
2026-031.7K—3

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

3.1 KB · ClawHub v1.0.0
---
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
Show all (61 lines)
- `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

Popular in Development

More from Iván

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.