- Home /
PlayerPrefs Int to Float
Hi, I have an idle game on both of the app stores and i'm running into the problem of numbers almost reaching the max float.
My question is, if I switch all floats to doubles and use my double to string and save my variables as strings instead, will everyone's progress disappear since i'm changing from float to double?
My title says int to float because I want this to be a really simple example.
So if the main number was an int and saves to PlayerPrefs.SetInt("VAR1"), will VAR1 always be what it was set to even though if I change it to a float or string? I wanna make sure if I go from floats to strings (then double after game loads) without everyone losing progress after updating the game because that would not be good at all. Thanks!
"I wanna make sure if I go from floats to strings (then double after game loads)"
Also to be more clear, before the update, it will be float, after the update, it will be string/double or whatever i want it to be. The main question is if all values will remain the same after this conversion or will it all return to 0?
Answer by hexagonius · Nov 09, 2018 at 08:06 AM
I found this, it could help:
https://forum.unity.com/threads/saving-a-double-with-playerprefs.89879/
Your answer
Follow this Question
Related Questions
PlayerPrefs for saving strings 1 Answer
PlayerPrefs script problem 2 Answers
PlayerPrefs Question 0 Answers
Set int to object from list? 0 Answers
Saving a Dictionary To PlayerPrefs 2 Answers