added customization

This commit is contained in:
MrTorex committed 2026-03-08 12:21:14 +03:00
1 parent 1d7d176814
commit 51b5659f4a
116 files changed
+16093 -5

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
using System.IO;
using UnityEngine;
namespace Code.Saves
{
public static class SaveManager
{
private static string Path => Application.persistentDataPath + "/save.json";
public static void Save(GameData data)
{
var json = JsonUtility.ToJson(data, true);
File.WriteAllText(Path, json);
}
public static GameData Load()
{
if (!File.Exists(Path)) return new GameData();
var json = File.ReadAllText(Path);
return JsonUtility.FromJson<GameData>(json);
}
}
}