Saving Scriptable Object Data - Inconsistent Between Builds
Posted: Sun Aug 18, 2019 8:55 pm
Hi,
I've set up several of my Scriptable Objects so that I can reference them as-is to be read by ES3.Load<SOInventoryItem>.
this is what saved data looks like in a JSON file:
For example,
"Picture_Of_Saxophone": {
"__type": "SOInventoryItem,Assembly-CSharp",
"value": {
"_ES3Ref": 6028262174322791446,
"itemState": 11,
"price": 0
}
This reference should save the SO's data and reference it for future loading using it's _ES3Ref #.
The problem is, the ES3Ref number changes, usually when I'm making new builds, or changing something around in my scene architecture, or working with multiple scenes.
Is there a way to keep the ES3ref consistent? Or a recommended practice to avoid having it change?
Or should I avoid using ES3Refs at all for my saving and loading of data (since I have the objects loaded in their own database - I don't actually need to load the data itself) and instead just use something like a string match.
guidance appreciated!
-G
I've set up several of my Scriptable Objects so that I can reference them as-is to be read by ES3.Load<SOInventoryItem>.
this is what saved data looks like in a JSON file:
For example,
"Picture_Of_Saxophone": {
"__type": "SOInventoryItem,Assembly-CSharp",
"value": {
"_ES3Ref": 6028262174322791446,
"itemState": 11,
"price": 0
}
This reference should save the SO's data and reference it for future loading using it's _ES3Ref #.
The problem is, the ES3Ref number changes, usually when I'm making new builds, or changing something around in my scene architecture, or working with multiple scenes.
Is there a way to keep the ES3ref consistent? Or a recommended practice to avoid having it change?
Or should I avoid using ES3Refs at all for my saving and loading of data (since I have the objects loaded in their own database - I don't actually need to load the data itself) and instead just use something like a string match.
guidance appreciated!
-G