How can I uses PlayerPrefs to load a scene? My script looks like this:
using UnityEngine;
using System.Collections;
public class LoadandSaveManager : MonoBehaviour {
public string thisScene;
public void SaveGame(){
PlayerPrefs.SetString (thisScene, "0");
Debug.Log ("Saved");
}
public void LoadGame(){
Application.LoadLevel (PlayerPrefs.GetString (thisScene));
}
}
I feel like its a really simple fix, but I can’t figure out how to do it, so if anyone could tell me how to, it would be very helpful.
Thanks!