Skip to content

A lightweight and flexible audio pooling system for Unity. Efficiently reuse audio sources to boost performance and simplify audio management.

Notifications You must be signed in to change notification settings

BluePixelDev/soundsnap

Repository files navigation

SoundSnap

GitHub Repo stars GitHub last commit

SoundSnap is a modular and efficient audio playback system for Unity. It avoids the performance cost of instantiating and destroying audio sources by pooling reusable instances, making it ideal for sound effects, UI sounds, ambient audio, and more.

Features

ScriptableObject-Based Configuration

Define reusable audio settings and playback parameters through SnapAsset objects. These assets support automatic configuration based on existing AudioSource components.

Intuitive Editor Integration

Drag and drop a real AudioSource component into a SnapAsset to auto-fill all settings. Easily preview and test playback directly in the editor.

Pooled Audio Source System

Avoid runtime garbage collection and minimize CPU overhead by pooling AudioSource instances. No more GameObject.Instantiate or Destroy calls for quick sounds.

Configurable Scaling

Adjust initial pool size, maximum limits, and overflow handling using a centralized configuration asset (SnapConfig). Fine-tune performance to match your project's needs.

Scene Awareness

By default, pooled objects are destroyed and recreated with each scene load. Optional settings allow persistent or scene-specific behavior.

Lightweight & Extensible

SoundSnap is designed to be unobtrusive and modular. Drop it into your project and start using it immediately — or extend it with custom behavior.

Support

This plugin supports Unity 6 and above

Getting Started

  1. Add the SoundSnap folder to your Unity project.
  2. Configure SnapConfig in Resources
  3. Create one or more SnapAssets to define how each sound should behave.
  4. Use SoundSnap.Play() in your code, or add the SnapPlayer component to your GameObjects.
  5. Optional: Add SnapTrigger3D or SnapTrigger2D to automatically trigger sounds based on collisions or triggers.

Example

using BP.SoundSnap;
...
SoundSnap.Play(mySnapAsset, transform.position);

Or, attach a SnapPlayer component to a GameObject and call:

mySnapPlayer.Play();

About

A lightweight and flexible audio pooling system for Unity. Efficiently reuse audio sources to boost performance and simplify audio management.

Topics

Resources

Stars

Watchers

Forks

Languages