Created
May 23, 2015 14:20
-
-
Save tsubaki/e65657d8cc040a9b8684 to your computer and use it in GitHub Desktop.
Unity5のグループに対するオーディオの設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SetVolumes : MonoBehaviour { | |
[SerializeField] | |
UnityEngine.Audio.AudioMixer mixer; | |
public float masterVolume | |
{ | |
set{ mixer.SetFloat("MasterVolume", Mathf.Lerp(-80, 0, value)); } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment