17 lines
322 B
C#
17 lines
322 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
|
|
public class SetVolume : MonoBehaviour
|
|
{
|
|
public AudioMixer mixer;
|
|
public void SetLevel(float sliderValue)
|
|
{
|
|
mixer.SetFloat("MusicVol", Mathf.Log10(sliderValue) * 20);
|
|
}
|
|
|
|
|
|
|
|
}
|