14 lines
329 B
C#
14 lines
329 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
public class MixerController : MonoBehaviour
|
|
{
|
|
[SerializeField] private AudioMixer mixer;
|
|
|
|
public void SetVolume(float sliderValue)
|
|
{
|
|
mixer.SetFloat("MasterVolume", Mathf.Log10(sliderValue) * 20);
|
|
}
|
|
}
|