Saving the login to the game

Viewed 61

please tell me how to save the input of the game. I mean that the player was authorized (entered a password and nickname), passed several levels and exited. How do I make sure that next time he does not log in again, but immediately goes to the levels menu?

1 Answers

Take a look at PlayerPrefs - it is a good mechanics to save your global data. For an example, you want to save player' login:

PlayerPrefs.SetString("Login", "AvgustKuk");
// later get this value:
var login = PlayerPrefs.GetString("Login");

You can serialize your data and store it as you want.

Related