Reworked existing save system for user data: Made path steam-compatible, added Versioning and try/catch to save

This commit is contained in:
2025-11-21 21:04:37 +01:00
parent ce29711614
commit 4ed6f4e7d9
3 changed files with 36 additions and 4 deletions
@@ -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;