Hey guys I’m still new to the PlayerPrefs and yet i don’t quite understand how can i use PlayerPrefs to save that gameobject is disabled after button click. I don’t think i can do that using only string and float value any help will be much appreciated. Thank you!
You just have to save something to playerprefs and then check it to see if the object should be turned off and then turn it off if needed.
Example, if my gameobject is named HealthPickup1, I could have an int playerpref
PlayerPref.SetInt(“HealthPickup1”, 1);
Then when I check for it, I know it’s value is 1, so I should turn off the gameobject.
Thank you for your answer, but i don’t quite understand how can i check if it’s value is 1
if(PlayerPref.GetInt("HealthPickup1") == 1)
1 Like
Thank you!