Not a Bug

Variables Backup, Integrity and Reassurance

Nathan Huebner 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 1

Before I start -- I am new, I just bought Bolt last night in the Asset Store, but I have been making my way through the tutorial.

I had some trouble when I first importing Bolt into my project, which resulted in the loss of my "Variables" data, for the Jump and Speed, etc. It looks like re-importing Variables wiped out even my Level Variables, App Variables, Scene Variables, etc.

This is my biggest concern is...What happens when the Variables system takes a dive, or my Unity decides it wants to start corrupting things and I have to reload / re-import the Variables system?

 - Can you guys make some kind of recovery of data for SavePlayerPrefs?  Such as a Backup that Bolt can detect when it reinstalls and asks if we want to pull data from that backup? 

 - If you can't make a backup, perhaps it might be possible to store all of this data within the Object / Scene / App itself, rather than into a plugin (I don't understand where the data is going, but I know when the Variables system is gone and re-imports, it wipes out all of its original data).

I hope this reaches someone high-up who can give a good answer, this is going to be my worst nightmare if I start relying on Bolt / Variables and something happens 6 months into project development.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Lazlo - 

Hey no need to apologize. It's a learning experience. I'm glad to know that the variable data was something I deleted. You're absolutely right.  The mystery of how this works unfolds the more I use it.

You guys are doing great, thank you!

Satisfaction mark by Nathan Huebner 3 years ago
Not a Bug

Hi Nathan!

Sorry you're having these issues.

Variable scopes are very different, and each has its own storage location:

  • Graph variables are stored within the graph definitions, either in a machine embed or a macro
  • Object variables are stored directly on the Variables component on the associated GameObject
  • Scene variables are stored on a SceneVariables GameObject automatically added to your scene
  • Application variables are stored in Ludiq/Bolt.Core/Generated/Variables/Resources/ApplicationVariables.asset
  • Initial Saved variables are stored in Ludiq/Bolt.Core/Generated/Variables/Resources/SavedVariables.asset
  • Runtime Saved variables are stored in the PlayerPrefs as a string, under the LudiqSavedVariables key

In your case, it doesn't seem like the variable system "took a dive"; if you deleted the entire Bolt folder when reimporting, you deleted the variable assets along with it.

PlayerPrefs do not get cleared when you import an asset package, so there is no need for Bolt to back them up. They should remain there. However, if you cleared your initial saved variables asset, these won't be available anymore.

Basically, if you ever want to move or reinstall Bolt, you should backup ApplicationVariables.asset and SavedVariables.asset.

I hope this clarifies the storage mechanism and reassures you. Let me know if you have any further question!