Skip to content

A Unity package that provides a simple and efficient way to manage sound effects and music playback in your game.

Notifications You must be signed in to change notification settings

ebukaracer/EzSoundCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EzSoundCore

PRs Welcome License: MIT

EzSoundCore is a Unity package that provides a simple and efficient way to manage sound effects and music playback in your game.

View in DocFx

Features

  • Easy-to-use methods for playing, muting, and enabling/disabling audio sources.
  • Support for audio mixer snapshots.
  • Editor utilities for importing and removing package elements.

Installation

In unity editor inside package manager:

  • Hit (+), choose Add package from Git URL(Unity 2019.4+)
  • Paste the URL for this package inside the box: https://github.com/ebukaracer/EzSoundCore.git#upm
  • Hit Add
  • If you're using assembly definition in your project, be sure to add this package's reference under: Assembly Definition References or check out this

Quick Usage

using Racer.EzSoundCore.Core;
using UnityEngine;

public class ExampleUsage : MonoBehaviour
{
    [SerializeField] private AudioClip sfxClip;
    [SerializeField] private AudioClip musicClip;

    private void Start()
    {
        // Play sound effect
        SoundCore.Instance.PlaySfx(sfxClip);

        // Play music
        SoundCore.Instance.PlayMusic();

        // Mute all audio sources
        SoundCore.Instance.MuteAllSources(true);

        // Unmute all audio sources
        SoundCore.Instance.MuteAllSources(false);
    }
}

Samples and Best Practices

After installation, use the menu option: Racer > EzSoundCore > Import Elements to import the prebuilt elements(prefabs) of this package, which will speed up your workflow. In the case of any updates to newer versions, use the menu option: Racer > EzSoundCore > Import Elements(Force).

Optionally import this package's demo from the package manager's Samples tab.

To remove this package completely(leaving no trace), navigate to: Racer > EzSoundCore > Remove package

Contributions are welcome! Please open an issue or submit a pull request.

About

A Unity package that provides a simple and efficient way to manage sound effects and music playback in your game.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages