string json = File.ReadAllText(path); return JsonUtility.FromJson<PlayerSaveData>(json);
string json = JsonUtility.ToJson(data, prettyPrint: true); string path = Path.Combine(Application.persistentDataPath, "save.json"); File.WriteAllText(path, json);
public override void OnInspectorGUI() DrawDefaultInspector(); if (GUILayout.Button("Edit Current Save")) SaveManager.EditSaveInJsonEditor(); unity save edit
public void AddCoins(int amount)
string path = Path.Combine(Application.persistentDataPath, "save.json"); if (File.Exists(path)) string json = File
private static void Validate(PlayerSaveData data)
Want the full Unity package with an example save editor UI? Download the template here . string json = File.ReadAllText(path)
void Start()
string json = File.ReadAllText(path); return JsonUtility.FromJson<PlayerSaveData>(json);
string json = JsonUtility.ToJson(data, prettyPrint: true); string path = Path.Combine(Application.persistentDataPath, "save.json"); File.WriteAllText(path, json);
public override void OnInspectorGUI() DrawDefaultInspector(); if (GUILayout.Button("Edit Current Save")) SaveManager.EditSaveInJsonEditor();
public void AddCoins(int amount)
string path = Path.Combine(Application.persistentDataPath, "save.json"); if (File.Exists(path))
private static void Validate(PlayerSaveData data)
Want the full Unity package with an example save editor UI? Download the template here .
void Start()