Essential Utilities
Scripts every Unity project needs regardless of genre — singletons, object pooling, input management, scene transitions, and more.
Learning Path
Follow these steps in order to build your Essential Utilities.
Included Scripts
Generic Singleton
Thread-safe, persistent singleton base class for managers like AudioManager, GameManager, etc.
public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T instance;
public static T Instance
{
get { ... }
}Object Pool
Generic object pooling system to reduce garbage collection. Perfect for bullets, particles, and e...
public class ObjectPool : MonoBehaviour
{
public static ObjectPool Instance { get; private set; }
public GameObject Spawn(string tag, Vector3 position, Quaternion rotation)
public void Despawn(string tag, GameObject obj)Scene Manager
Async scene loading with loading screen, progress bar, and minimum load time. Clean transitions b...
public class SceneLoader : MonoBehaviour
{
public static SceneLoader Instance { get; private set; }
public void LoadScene(string sceneName)
private IEnumerator LoadSceneAsync(string sceneName)Input Manager
Clean wrapper around Unity's new Input System with action map switching, rebinding support, and i...
public class InputManager : MonoBehaviour
{
public static InputManager Instance { get; private set; }
public bool WasPressed(string actionName)
public void StartRebind(string actionName)Timer / Countdown
Versatile timer with countdown, stopwatch, and repeating modes. Formatted time display and UnityE...
public class Timer : MonoBehaviour
{
public enum TimerMode { Countdown, Stopwatch, Repeating }
public UnityEvent OnTimerComplete;
public UnityEvent<float> OnTimerTick;
public void StartTimer()Audio Manager
Complete audio manager with music crossfade, SFX pooling, volume control, and persistence.
public class AudioManager : MonoBehaviour
{
public static AudioManager Instance { get; private set; }
public void PlaySFX(AudioClip clip, float volumeScale = 1f)
public void PlayMusic(AudioClip clip, bool crossfade = true)Screen Fader
Simple screen fade-in/fade-out with configurable color and duration. Great for scene transitions.
public class ScreenFader : MonoBehaviour
{
public static ScreenFader Instance { get; private set; }
public Coroutine FadeIn(float duration = -1f)
public Coroutine FadeOut(float duration = -1f)