16 lines
436 B
C#
16 lines
436 B
C#
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");
|
|
}
|
|
}
|
|
} |