// One time Initialize
AudioPlayer.Instance.Initialize();
AudioPlayer.Instance.Bgm.Play(audioClip);
AudioPlayer.Instance.Bgm.CrossFade(audioClip, crossFadeTime: 3f);
AudioPlayer.Instance.Se.Play(audioClip);
// 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
.
- Copy for
https://github.com/kameffee/AudioPlayer.git#0.0.4
- Open a PackageManager.
Window/PackageManager
- Click the add [+] button in the status bar.
- Select Add package from git URL from the add menu.
- Enter a valid Git URL in the text box and click Add.
see for Installing from a Git URL