Reworked existing save system for user data: Made path steam-compatible, added Versioning and try/catch to save
This commit is contained in:
@@ -9,6 +9,15 @@ namespace Babushka.scripts.CSharp.Common.Savegame;
|
||||
[Serializable]
|
||||
public class SaveData
|
||||
{
|
||||
// for future use in case the structure changes.
|
||||
public const int VERSION = 1;
|
||||
public int version { get; set; } = VERSION;
|
||||
|
||||
public bool IsVersionValid()
|
||||
{
|
||||
return VERSION == version;
|
||||
}
|
||||
|
||||
public string SceneName;
|
||||
public string Id;
|
||||
public string JsonPayload;
|
||||
|
||||
Reference in New Issue
Block a user