Answer the question
In order to leave comments, you need to log in
Why are PlayerPrefs reset after the second run?
After many uses of PlayerPrefs to save user profile data, I ran into a problem.
There is a button to save the hairstyle selection:
PlayerPrefs.SetString("pickedHairName", "Hair1");
Debug.Log("Save Hair success");
private void Start()
{
if (PlayerPrefs.HasKey("pickedHairName"))
pickedHairName = PlayerPrefs.GetString("pickedHairName");
else
pickedHairName = "bold";
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question