I want to set some playerprefs for when the player first plays the game, locking all the levels etc but how can I do this only once and not everytime the player starts the app or presses the play button? what is a good way of doing this? can’t think of any right now.
thanks.
Also to load a level I use this:
for(int i=0; i < 31; i++){
int LevelDone = PlayerPrefs.GetInt("LevelC"+i.ToString());
int j = i+1;
if(PlayerPrefs.GetInt("LevelC"+i.ToString()) == 2 &&
PlayerPrefs.GetInt("LevelC"+j.ToString()) == 1){
newLevel(i);
}
This works fine in unity editor but once I put it on my phone or any android device it doesnt seem to pick up this code? also how can I set all LevelC’s to 1 but only one time? 1 = not complete 2 = complete but everything has to be not completed at the start.