Playerprefs (67665)

Is it possible to create multiple saves using playerprefs? I’m trying to create 3 save slots for the player to choose from. Would it just be stored in an array? or?

http://wiki.unity3d.com/index.php?title=ArrayPrefs2

1 Answer

1

Sure. You can use an int to specify player id and use it to point to a key with all of the setting’s. so like player id one would be identiified by id 1. then you can name thier data like liaves1 = 1; and player two can be lives2 = one. you can then use function to PlayerPrefs.SetInt(“lives”+(string)playerid, 10); where playerid is the number of the player id. To get it you would then use. PlayerPrefs.GetInt(“lives”+(string)playerid);