Firstborn/Assets/RPG Creation Kit/Scripts/Save System/UI/Savegame.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

23 lines
586 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPGCreationKit;
using System.IO;
namespace RPGCreationKit.SaveSystem
{
public class Savegame : MonoBehaviour
{
public SaveFile saveFile;
public FileInfo fileInfo;
public void LoadSaveFile(FileInfo _fileInfo)
{
fileInfo = _fileInfo;
saveFile = new SaveFile();
StreamReader stream = _fileInfo.OpenText();
saveFile = JsonUtility.FromJson<SaveFile>(stream.ReadToEnd());
stream.Close();
}
}
}