unity

Installation
SKILL.md

Unity Guide

Applies to: Unity 2022 LTS+, C#, Games, VR/AR, Simulations, Interactive Media

Core Principles

  1. Component-Based Architecture: One MonoBehaviour = one responsibility
  2. Composition Over Inheritance: Combine components on GameObjects; avoid deep class hierarchies
  3. Data-Driven Design: Use ScriptableObjects for configuration and shared data
  4. Event-Driven Communication: Decouple systems with C# events, UnityEvents, or ScriptableObject events
  5. Cache Everything: Never call Find, GetComponent, or allocate in Update

Guardrails

MonoBehaviour Rules

  • Keep Update() bodies under 20 lines; delegate to focused methods
  • Cache all GetComponent results in Awake() (never call in Update)
  • Subscribe to events in OnEnable, unsubscribe in OnDisable
Related skills
Installs
10
Repository
ar4mirez/samuel
First Seen
Mar 1, 2026