36 lines
838 B
C#
Executable File
36 lines
838 B
C#
Executable File
using Unity.VisualScripting;
|
|
using UnityEditor.Rendering;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
using UnityEngine.InputSystem.iOS;
|
|
using UnityEngine.Rendering;
|
|
using UnityEngine.UI;
|
|
|
|
public class SettingsMenu : MonoBehaviour
|
|
{
|
|
|
|
Slider volumeSlider;
|
|
|
|
public AudioMixer audioMixer;
|
|
|
|
float masterVolume = 0;
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
// Slider volumeSlider = GetComponentInChildren<Slider>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void adjustVolume() {
|
|
Slider volumeSlider = GetComponentInChildren<Slider>();
|
|
masterVolume = volumeSlider.value;
|
|
audioMixer.SetFloat("Master", masterVolume * 20);
|
|
Debug.Log(masterVolume);
|
|
}
|
|
}
|