PlayerPrefs.GetInt returning 0?

Hi All,

I have a script which toggles sound on/off based on playerprefs. For some reason when game is started I always get 0 value for the sound setting in SoundInit method. Cant figure out why?
Is it because Im calling it on Start method?

using UnityEngine;
using System.Collections;
using UnityEngine.Analytics;

public class SoundManager : MonoBehaviour {

	public GameObject SoundOnBtn, SoundOffBtn;

	// Use this for initialization
	void Start () {
		SoundInit ();
	}

	public void SoundInit() {

		int settingSound = PlayerPrefs.GetInt ("soundsetting");
		Debug.Log ("settingSound " +settingSound);
		if (settingSound == 0) {
			//Music is ON
			SoundOnBtn.SetActive (true);
			SoundOffBtn.SetActive (false);
			AudioListener.volume = 1f;

		} else {
			//Music is OFF
			SoundOnBtn.SetActive (false);
			SoundOffBtn.SetActive (true);
			AudioListener.volume = 0f;

		}
	}

	public void SoundToggle() {
		int settingSound = PlayerPrefs.GetInt ("soundsetting");
		if (settingSound == 0) {
			//Music is ON
			Debug.Log ("settingSound set to 1");
			PlayerPrefs.SetInt ("soundsetting",1);
			SoundOnBtn.SetActive (false);
			SoundOffBtn.SetActive (true);
			AudioListener.volume = 0f;
			Analytics.CustomEvent("SoundOFF");
			Debug.Log (PlayerPrefs.GetInt ("soundsetting"));
		} else {
			//Music is OFF
			PlayerPrefs.SetInt ("soundsetting",0);
			SoundOnBtn.SetActive (true);
			SoundOffBtn.SetActive (false);
			Debug.Log ("settingSound set to 0");
			AudioListener.volume = 1f;
			Analytics.CustomEvent("SoundON");

		}
		PlayerPrefs.Save ();
	}
}

you never called SoundToggle();

if you call it from button you might need to make a

    public /  prive int settingSound;

void Save(){
                                   if (settingSound == 0){
                                          settingSound =   PlayerPrefs.SetInt ("soundsetting",0);
                                   }
  }

void Load(){
settingSound = PlayerPrefs.GetInt (“soundsetting”);
}

you can call them from buttons or commands

Much Embarassingly, I had DeleteAll playerprefs being called in Gameplay scene which was causing the reset

// Use this for initialization
	void Start () {
		gamemode = SceneInfo.gameMode;
		PlayerPrefs.DeleteAll ();
		fsm.ChangeState(States.Init);
	}