Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created May 23, 2015 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/e65657d8cc040a9b8684 to your computer and use it in GitHub Desktop.
Save tsubaki/e65657d8cc040a9b8684 to your computer and use it in GitHub Desktop.
Unity5のグループに対するオーディオの設定
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