https://github.com/bluepixeldev/aftertone

A lightweight Unity plugin for audio pooling. This plugin aims to simplify playing throwaway abrupt sound effects such as gunshot, collision or UI sounds by utilizing a pool of prepared audio sources to reuse and play.

https://github.com/bluepixeldev/aftertone

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

audio package pool pooling scriptableobject unity unity-audio unity-package unity3d-plugin unitypackage
Last synced: 5 months ago · JSON representation

Repository

A lightweight Unity plugin for audio pooling. This plugin aims to simplify playing throwaway abrupt sound effects such as gunshot, collision or UI sounds by utilizing a pool of prepared audio sources to reuse and play.

Basic Info
  • Host: GitHub
  • Owner: BluePixelDev
  • Language: C#
  • Default Branch: master
  • Homepage:
  • Size: 348 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
audio package pool pooling scriptableobject unity unity-audio unity-package unity3d-plugin unitypackage
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme

README.md

Aftertone

GitHub Repo stars GitHub last commit

Aftertone is a Unity plugin designed for efficient audio management. It uses a pool of reusable audio sources to provide a fast, lightweight, and robust way of playing short-lived, spatial audio like explosions, footsteps, melee impacts, and more.

⚡ Features

Configurable

Aftertone can be customized via a config asset automatically created in the Resources folder.

You can configure: - Initial Pool Size - Number of audio sources to pre-create at startup. - Pool Expansion Size - Number of audio sources to add when the pool runs out. - Max Pool Size - Upper limit for the number of pooled sources. - Use Debug - Displays an in-game debug panel showing pool usage.

Lightweight

The entire system was built to be light weight and as performance optimized as possible.

SO-Architecture

Sounds are defined using ScriptableObjects called ToneAssets.

Each ToneAsset defines: - The audio resource (an AudioClip or a random container) - All relevant properties of a Unity AudioSource (volume, spatial blend, pitch, etc.)

This architecture encourages reuse, configurability, and a clean separation between logic and data.

Controllable Playback via Handles

When you play a sound, you receive a ToneHandle — a safe, lightweight struct that allows you to: - Set the 3D position (.At(position)) - Track a Transform for dynamic movement (.Track(transform)) - Pause, resume, or stop playback - Register completion or stop callbacks

Once the audio finishes or is stopped, the handle is automatically marked as invalid to prevent accidental reuse.

Custom Editors

Use Unity’s custom inspector to easily configure sound assets. You can: - Copy properties from existing AudioSource components into a ToneAsset - Preview or test sounds directly from the editor

🧪 Example Use

```csharp // Play a sound at a position var handle = Aftertone.Play(explosionAsset).At(transform.position);

// Optionally track a moving object handle.Track(targetTransform);

// Stop manually if needed handle.Stop(); ```

⭐ Collaboration

Want to contribute, fix bugs, or suggest improvements? Feel free to submit issues, improvements or even pull requests.

Owner

  • Name: BluePixel
  • Login: BluePixelDev
  • Kind: user
  • Location: Czech Republic

A game dev. working on an FPS/Roguelike game, Re-Take. Set in the near future, the internet is under attack of a virus. Only you can stop it and regain control.

GitHub Events

Total
  • Push event: 2
Last Year
  • Push event: 2

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

package.json npm