internal static WorldResource LoadSession(string savePath)
{
if (Directory.Exists(savePath))
{
var userPath = Path.GetDirectoryName(savePath);
var saveResource = new WorldResource
{
Savename = Path.GetFileName(savePath),
UserName = Path.GetFileName(userPath),
Savepath = savePath,
DataPath = UserDataPath.FindFromSavePath(savePath)
};
saveResource.LoadCheckpoint();
return saveResource;
}
return null;
}