15 lines
		
	
	
		
			393 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			393 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using UnityEngine;
 | |
| using System.Collections;
 | |
| 
 | |
| namespace SlimUI.ModernMenu{
 | |
| 	public class CheckMusicVolume : MonoBehaviour {
 | |
| 		public void  Start (){
 | |
| 			// remember volume level from last time
 | |
| 			GetComponent<AudioSource>().volume = PlayerPrefs.GetFloat("MusicVolume");
 | |
| 		}
 | |
| 
 | |
| 		public void UpdateVolume (){
 | |
| 			GetComponent<AudioSource>().volume = PlayerPrefs.GetFloat("MusicVolume");
 | |
| 		}
 | |
| 	}
 | |
| } |