using UnityEngine;
using System.Collections;
public class UIVolumeControl : MonoBehaviour {
private UISlider _slider;
// Use this for initialization
void Start ()
{
_slider = gameObject.GetComponent<UISlider>();
_slider.sliderValue = AudioListener.volume ;
_slider.onValueChange += OnValueChange;
}
void OnValueChange(float val)
{
AudioListener.volume = val;
print(val);
}
}