16 lines
436 B
C#
Raw Normal View History

2025-07-25 15:29:14 +05:00
using UnityEngine;
using System.Collections;
namespace SlimUI.ModernMenu{
public class CheckSFXVolume : MonoBehaviour {
public void Start (){
// remember volume level from last time
GetComponent<AudioSource>().volume = PlayerPrefs.GetFloat("SFXVolume");
Debug.Log(PlayerPrefs.GetFloat("SFXVolume"));
}
public void UpdateVolume (){
GetComponent<AudioSource>().volume = PlayerPrefs.GetFloat("SFXVolume");
}
}
}