public LoadCheckpoint ( bool snapshot = false ) : void | ||
snapshot | bool | |
return | void |
public void LoadCheckpoint(bool snapshot = false)
{
var filename = Path.Combine(Savepath, SpaceEngineersConsts.SandBoxCheckpointFilename);
MyObjectBuilder_Checkpoint checkpoint;
SpaceEngineersApi.TryReadSpaceEngineersFile<MyObjectBuilder_Checkpoint>(filename, out checkpoint, out _compressedCheckpointFormat, snapshot);
Checkpoint = checkpoint;
}
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); }