Easy Save 3 Save Progress Wheel/Bar

Hey, so at the moment im using easy save as my save system and its come to the point where there’s alot of data so on particularly android build’s it will freeze for a while while it’s saving, this can look a bit bad as it looks like the game has crashed. Now i dont need a progress bar really or even a spinning save wheel. My solution was going to be have a blank image saying saving in progress get toggled on when saving starts and then when it finishes it gets toggled off. I was wondering what would be a good way to get it to toggle off. My first thought was to have it toggle on before all the lines of code to save and then toggle off after the lines of code to save as i thought the freezing would be happening while its running through all the save code. This didnt work as it toggled it on and then back off before the freezing to save happened

If anyone has any idea’s id love to hear

I don’t use easy save, but you should look at how the save works. Does it have a callback you can tie into. Does it return something that you can check against to see if save is complete. I figure it might have something already setup for you so you can make sure code executes after the save is done.

Actually just looked at their documentation and doesn’t look like they have anything for that. If the save itself is causing a freeze, then the code to turn off the gui should happen after the save freeze is done. so it might be how you have it coded possibly.

yeh i just had another look, weirdly it runs the save code and therefore freezes before doing anything else, even just having the toggle object on makes it toggle on after the freezing and saving is done, i’ve tried having it in the script, having it as its own function which is called on click before the save and having the on click game object set to active before the save function is called and it still freezes and saves before doing anything else which is odd

Ok so my next idea that i’ll try to morrow is the button you press to save doesnt save anything it just toggles the gameobject that says its saving on, this will have an onenable function to do the save then will also have the thing to set the save in progress game object to false, hopefully this means that once its done saving it will get set to off

If you have the code in a method like

Activate object
Perform save
Disable object

Then the object will turn on and off due to the fact it never pauses to render the gui. You need to turn on the object, do a pause, perform your save, and then turn it off. Because once your save happens, it’s tied up. Could use a coroutine to allow for a pause in between.

Yeh i have the leantween plugin that i was going to use but could cause errors having the coroutine active while freezing is going on, i think ill do it the onEnable way but thanks for your help