unityAvoid common Unity mistakes — lifecycle ordering, GetComponent caching, physics timing, and Unity's fake null.
Install via ClawdBot CLI:
clawdbot install ivangdavila/unityAwake before Start — use Awake for self-init, Start for cross-referencesOnEnable called before Start — but after AwakeAwake called even if disabled — Start only when enabledGetComponent every frame is slow — cache in Awake or StartGetComponentInChildren searches recursively — expensive on deep hierarchiesTryGetComponent returns bool — avoids null check, slightly fasterRequireComponent attribute — ensures dependency, documents requirementFixedUpdate, not Update — consistent regardless of framerateFixedUpdate can run 0 or multiple times per frame — don't assume 1:1Rigidbody.MovePosition in FixedUpdate — transform.position bypasses physicsTime.deltaTime in Update, Time.fixedDeltaTime in FixedUpdate — or just use deltaTime== null returns true, but object exists?. doesn't work properly — use == null or bool conversionDestroy doesn't happen immediately — object gone next frameDestroyImmediate only in editor — causes issues in buildsStartCoroutine needs MonoBehaviour active — disabled/destroyed stops coroutinesyield return null waits one frame — yield return new WaitForSeconds(1) for timeStopCoroutine needs same method or Coroutine reference — string overload unreliableInstantiate is expensive — pool frequently created/destroyed objectsInstantiate(prefab, parent) sets parent — avoids extra SetParent callSetActive(false) before returning to pool — not Destroy[SerializeField] for private fields in inspector — prefer over publicpublic fields auto-serialize — but exposes API you may not want[HideInInspector] hides but still serializes — [NonSerialized] to skip entirelyCreateAssetMenu attribute for easy creation — right-click → CreateFind methods every frame — cache referencesCompareTag("Enemy"), not tag == "Enemy"NonAlloc variants: RaycastNonAllocasync/await without context — use UniTask or careful error handlingGenerated Mar 1, 2026
Developers creating casual or hyper-casual mobile games need to optimize performance for various devices. This skill helps avoid common pitfalls like expensive GetComponent calls every frame and improper physics timing, ensuring smooth gameplay and better battery life.
Teams building immersive educational experiences in VR/AR must manage object lifecycle and pooling efficiently. This skill's guidance on Instantiate optimization and proper null handling prevents memory leaks and ensures stable performance during extended use.
Firms creating real-time architectural walkthroughs need reliable physics and consistent rendering. Following the FixedUpdate guidelines and proper serialization practices ensures accurate simulations and maintainable scene configurations across different hardware.
Small indie teams rapidly iterating on game concepts benefit from structured lifecycle management and ScriptableObject usage. This prevents common mistakes like Find methods in Update loops and enables clean data separation for faster development cycles.
Enterprises developing interactive training modules require stable coroutine management and proper UI anchoring. The skill's guidance on coroutine limitations and resolution-independent UI ensures reliable deployment across diverse corporate hardware setups.
Free-to-play games with in-app purchases rely on optimized performance to retain users. Implementing proper caching and pooling reduces crashes and improves user experience, directly impacting ad revenue and conversion rates.
Companies selling simulation software to other businesses need robust, maintainable codebases. Following serialization best practices and ScriptableObject patterns reduces support costs and enables easier customization for different clients.
Developers creating and selling Unity assets on the Asset Store must provide performant, well-structured code. Adhering to lifecycle ordering and proper component dependencies increases asset ratings and repeat sales through positive reviews.
💬 Integration Tip
Implement a centralized initialization system using Awake/Start patterns, and create a pooling manager for frequently instantiated objects to immediately apply these optimizations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.