Unity Utility Scripts
11 free C# scripts 4 beginner6 intermediate1 advanced Unity 2022.3+ MIT licensed
Utilities are the scripts you rewrite in every project: an object pool so bullets and particles stop allocating, a generic singleton base class for managers, async scene loading with a progress bar, timers, and camera shake.
The category also holds a few larger systems that do not belong to one genre: a raycast interaction system, a wave spawner, a lightweight quest tracker, a day and night cycle, a BSP dungeon generator, and an Input Manager that puts Unity's legacy Input behind rebindable keys and events.
Start with Scene Manager
Async scene loading with loading screen, progress bar, and minimum load time. Clean transitions between levels.
SceneLoader.cs · 5 Inspector fields · beginner
Open Scene ManagerAll 11 utilities scripts
- Scene Manager Async scene loading with loading screen, progress bar, and minimum load time. Clean transitions between levels.
- Camera Shake Perlin noise camera shake with magnitude, frequency, and duration. Trigger from explosions, impacts, or any event.
- Interaction System Raycast-based interaction with prompt UI, hold-to-interact option, and IInteractable interface. Press E to interact with anything.
- Timer / Countdown Versatile timer with countdown, stopwatch, and repeating modes. Formatted time display and UnityEvent callbacks.
- Generic Singleton Thread-safe, persistent singleton base class for managers like AudioManager, GameManager, etc.
- Object Pool Generic object pooling system to reduce garbage collection. Perfect for bullets, particles, and enemies.
- Quest System Lightweight quest tracker with ScriptableObject definitions, objectives, progress tracking, and reward callbacks.
- Input Manager Rebindable action layer over Unity's legacy Input class: named actions, runtime key rebinding saved to PlayerPrefs, and pressed and released queries.
- Wave Spawner Wave-based enemy spawner with configurable wave definitions, spawn points, delays, and wave completion callbacks.
- Day/Night Cycle Configurable day/night cycle with directional light rotation, color gradient, and time-of-day event triggers.
- Procedural Dungeon Generator BSP-based dungeon generator that creates random room layouts with corridors, doors, and spawn points.
What these scripts need
Read from each script's source, so this list stays in step with the code.
Calls DontDestroyOnLoad, so the object survives scene loads. Place it once, in your first scene.
5 of 11: Scene Manager, Generic Singleton, Object Pool, Quest System, Input Manager
Reads the legacy Input Manager (UnityEngine.Input). If Project Settings > Player > Active Input Handling is set to Input System Package only, Unity throws an InvalidOperationException; set it to Both.
2 of 11: Interaction System, Input Manager
Loads scenes through SceneManager: add every scene it loads to Build Settings.
Applies to: Scene Manager
Defines a ScriptableObject asset: create one from Assets > Create > Quests > Quest Data.
Applies to: Quest System
Kits that build on them
- FPS Foundation Kit First-person shooter foundation with movement, camera, weapons, projectiles, health, and screen shake.
- RTS Starter Kit Real-time strategy foundation with camera, click-to-move navigation, unit selection, minimap, and wave spawning.
- RPG Essentials Kit Core RPG systems: health, inventory, dialogue, quests, save/load, and damage numbers — everything for an RPG prototype.
- Enemy AI Kit Complete enemy AI pipeline: state machine, patrol, chase, health, and wave spawning with debug visualization.
- UI Toolkit Kit Essential game UI components: health bars, damage numbers, tooltips, minimap, screen fader, and timer display.
Guides that use them
- Free Unity C# Scripts and Game Systems: 55 Copy-Paste Tools for Indie Games A catalog of 55 free Unity C# scripts and 13 game systems: movement, camera, health, save/load, UI, AI, mobile controls, inventory and dialogue.
- Unity vs Unreal for Indie Developers in 2026: An Honest Comparison Unity vs Unreal for solo and small-team games: iteration speed, C# vs Blueprints and C++, licensing costs, hardware, build size, platforms, and where each engine clearly wins.
- How to Build an Inventory System in Unity (Step-by-Step Guide) Learn how to build a complete inventory system in Unity from scratch. Covers ScriptableObject item definitions, slot management, drag & drop UI, and JSON save/load.
- How to Build an RPG Quest System in Unity Build a complete RPG quest system in Unity with ScriptableObject-driven objectives, branching conditions, and persistent progress tracking.
- Building Enemy AI in Unity: From Patrol to Boss Fights Build enemy AI in Unity from simple patrol to advanced boss fights. Covers waypoint systems, chase behavior, A* pathfinding, wave spawning, and state machine-driven bosses.