How often should I save data in ProfileService?

I am working on a Tower Defense game and I feel like I am saving too much. Right now, I have it set so the data is saved in the following circumstances:

  • Player leaves
  • Game shutdown
  • Inventory closes
  • Shop closes

Is having the data save when the inventory closes and the shop closes redundant or is it perfectly fine?

Hello!

In the title you indicated that you are using ProfileService. It already incorporates auto-saving, and the DataStore calls are automatically spread depending on the number of players, so that the profile saving doesn’t exhaust more than 20% of the total budget.

That’s why you should also feel free to keep updating Profile.Data at any time.

Update. In the listed cases you shouldn’t have to do any manual saving at all. The only thing that you should do is release the profile after you are no longer using it in order to normally unlock the session.

1 Like

Thank you so much for the answer!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.