public void ConfirmCharacter() { mainPlayer.ChangeCharacter(anims[currIdx]); // Set in player prefs to be accessed in game scene PlayerPrefs.SetString("PlayerAnim", anims[currIdx].name); }
void Start() { // Set player's skin string animName = PlayerPrefs.GetString("PlayerAnim"); if (animName == null) { animName = "BlueAstroAnim"; PlayerPrefs.SetString("PlayerAnim", animName); } RuntimeAnimatorController skin = Resources.Load("Animations/" + animName) as RuntimeAnimatorController; player.ChangeCharacter(skin); // Set audio levels float musicVolume = PlayerPrefs.GetFloat("MusicVolume", 0.75f); float fxVolume = PlayerPrefs.GetFloat("FXVolume", 0.75f); audioMixer.SetFloat("MusicVol", Mathf.Log10(musicVolume) * 20); audioMixer.SetFloat("FXVol", Mathf.Log10(fxVolume) * 20); }