- Home /
Question by
Collects · Feb 23, 2019 at 02:45 AM ·
playerprefsstringsave data
Using Player Prefs
I have a FnaF game, and I am trying to use player prefs to set up the camera, so when you close the camera, and open it it brings you to where you where. I have some code, and you can decide to use it or note but here it is,
//On the button script
PlayerPrefs.SetString("Cam06", Cam06String);
//On the other script which brings up the camera
string Cam06 = PlayerPrefs.GetString("Cam06");
I think this would work, but I don't know how to use the name to do this. Please help, thanks!
Comment
Your answer
Follow this Question
Related Questions
Store individual positions of GameObjects in a string 3 Answers
Save the state of a gameobject between scenes 1 Answer
Saving data 1 Answer
PlayerPrefs from One App to Another. 1 Answer
playerprefs currency help 1 Answer