Unity Engine Cheatsheet
Quick Unity reminders for scenes, prefabs, components, and performance.
Editor Navigation
FFrame selected object in Scene view.
W / E / RMove / Rotate / Scale tools.
Q / THand tool / Rect tool.
Shift + FLock Scene view to the selected object.
Scenes and Prefabs
File > Save Scene As...Duplicate a scene without overwriting.
SceneManager.LoadScene("Name")Load a scene by name (add to Build Settings).
DontDestroyOnLoad(obj)Persist objects across scenes (use sparingly).
Prefab ModeEdit prefabs in isolation to avoid scene noise.
Overrides > Apply / RevertManage instance overrides cleanly.
Core Scripting
Awake()Initialize references before Start; called even if disabled.
Start()Run after Awake, before first Update.
Update()Frame-by-frame logic (use Time.deltaTime).
FixedUpdate()Physics updates (use for Rigidbody work).
OnEnable() / OnDisable()Hook into lifecycle for subscriptions.
Debug.Log()Console output for debugging.
GameObjects and Components
GetComponent<T>()Fetch a component on the same GameObject.
TryGetComponent<T>(out var c)Safer, allocation-free component lookup.
SerializeFieldExpose private fields in the Inspector.
[RequireComponent(typeof(Rigidbody))]Guarantee a component dependency.
Instantiate(prefab)Spawn objects at runtime (pool when possible).
Destroy(gameObject)Remove objects (prefer pooling for frequent spawns).
Physics and Collisions
RigidbodyUse for physics-driven motion and collisions.
OnCollisionEnter()Called when colliders start touching.
OnTriggerEnter()Triggered for isTrigger colliders.
Physics.Raycast()Cast rays for line-of-sight, clicks, or hits.
LayerMaskFilter physics checks and collisions.
UI and Input
Canvas > Screen Space - OverlayDefault for HUD and menus.
RectTransform anchorsPin UI to corners, edges, or center for responsive layout.
EventSystemRequired for UI interactions.
Input.GetAxis("Horizontal")Legacy input for movement.
Input System packageModern input actions and rebinding support.
Animation and Audio
AnimatorState machine for character and UI animations.
Animator.SetTrigger("Fire")Trigger transitions between states.
AnimationEventCall functions from within an animation timeline.
AudioSource.Play()Play a sound clip on the attached source.
AudioMixerRoute volumes and apply effects.
Performance and Profiling
Window > Analysis > ProfilerFind CPU and GPU bottlenecks.
Window > Analysis > Frame DebuggerInspect draw calls and rendering order.
Object poolingReuse objects instead of instantiating every frame.
Batching and atlasingReduce draw calls for sprites and UI.
AddressablesStream content and manage memory efficiently.
Builds and Deployment
File > Build SettingsAdd scenes and choose target platform.
Development BuildEnable deep profiling and script debugging.
Player Settings > Scripting BackendIL2CPP for release, Mono for faster iteration.
Quality SettingsTune tiers for different platforms.