- Home /
Autosaving
Hi everyone, I'm working on automatically saving the script data but I encountered a problem. Well, to download the data I use void start and there is data downloaded, and under this void there is a void update and there are written data all the time but I did something that after entering the game (in my case making or doing anything that will make the data will be saved ) and then turning it off and re-entering all values are set to 0 and only after "refreshing" the game these values are restored (refreshing I mean clicking a button in the game and returning)
void Start()
{
click.Allcash = PlayerPrefs.GetFloat("Allcash");
if (click.Allcash > 0)
{
(...)
}
}
void Update()
{
if (click.Allcash > 0)
{
(...)
}
Your answer
Follow this Question
Related Questions
How do I make a basic easy Save and load function with JavaScript 1 Answer
Save scene 1 Answer
Loading a serialized file after changing the adding a new var to it 2 Answers
PlayerPrefs.GetString not saving past values 0 Answers
How do i change my save "Total Coin" everytime i get more coins. 0 Answers