Skip to content

kameffee/AudioPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioPlayer

Unity 2019.4+ License: MIT

Introduction

Initialize

// One time Initialize
AudioPlayer.Instance.Initialize();

Play Bgm

Simple play

AudioPlayer.Instance.Bgm.Play(audioClip);

Cross Fade

AudioPlayer.Instance.Bgm.CrossFade(audioClip, crossFadeTime: 3f);

Play Sound effects

AudioPlayer.Instance.Se.Play(audioClip);

Volume settings

Change the volumes

// Master volume
AudioPlayer.Instance.SetMasterVolume(0.5f);

// Bgm volume
AudioPlayer.Instance.Bgm.SetVolume(1f); // ActualVolume 0.5f

// Se volume
AudioPlayer.Instance.Se.SetVolume(0.5f); // ActualVolume 0.25f

The actual volume of the BGM will be 0.5 x 1 = 0.5f.
The actual volume of the SE will be 0.5 x 0.5 = 0.25f.

Installation

Installing from a Git URL

  1. Copy for https://github.com/kameffee/AudioPlayer.git#0.0.4
  2. Open a PackageManager. Window/PackageManager
  3. Click the add [+] button in the status bar.
  4. Select Add package from git URL from the add menu.
  5. Enter a valid Git URL in the text box and click Add.

see for Installing from a Git URL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages