Unity C# scripts

55 single-file scripts, MIT licensed. Every page shows the Inspector fields the script adds, its public API, what it needs in your scene, and the Unity version it targets.

55 scripts 40 work in 2D and 3D 4 2D only 11 3D only 51 on Unity 2022.3+, 4 need Unity 6

Touch & Mobile 12

Free Unity C# mobile scripts: virtual joystick, swipe and tap input, pinch-to-zoom, safe-area handling for notched phones, and hyper-casual mechanics.

Movement 11

Free Unity C# movement scripts: 2D and 3D player controllers, first-person, third-person and top-down cameras, wall jumps and dashes. MIT licensed.

Utilities 11

Free Unity C# utility scripts: object pooling, a generic singleton, async scene loading, timers, camera shake, interaction, wave spawning and quests.

UI 6

Free Unity C# UI scripts: health bars with smooth fill, floating damage numbers, screen fades, tooltips and a render-texture minimap.

AI & Pathfinding 5

Free Unity C# enemy AI scripts: waypoint patrols, chase with line of sight, NavMesh click-to-move, and grid A* pathfinding without a NavMesh.

Health & Combat 4

Free Unity C# health and combat scripts: a reusable health component with invincibility frames, projectiles with homing, and ScriptableObject weapons.

Inventory 2

Free Unity C# inventory scripts: collectible pickups with bobbing and magnet pull, and a lightweight list-based inventory for prototypes.

Save & Load 2

Free Unity C# save scripts: a type-safe PlayerPrefs wrapper for settings, and a JSON save utility that writes any serializable class to disk.

Audio 1

A free Unity C# audio manager with music crossfading, pooled sound effects and separate music and SFX volume, kept alive across scene loads.

Dialogue 1

A free Unity C# dialogue trigger for NPCs: sequential lines, a typewriter text effect and a key press to advance. No dialogue framework needed.