public static void SaveSession(string path_inp) { SessionSave saveFile = new SessionSave(); //labelsession SessionHandler sessionHandler = ReferenceHandler.Instance.GetSessionHandler(); SessionSave_LabelSession labelSession = new SessionSave_LabelSession(); Sessionsave_MovementOptions ingameOptions = new Sessionsave_MovementOptions(); labelSession.AssignLabelSessionValues(); ingameOptions.AssignInGameOptionValues(); saveFile._labelsession = labelSession; saveFile._ingameOptions = ingameOptions; //metadata if (Util.DataLoadInfo._dataType == Util.Datatype.hdf5_DaimlerLidar) { SessionSave_MetaData.SessionSave_MetaData_HDF5DaimlerLidar hdf5DL = new SessionSave_MetaData.SessionSave_MetaData_HDF5DaimlerLidar(); hdf5DL.AssignMetaDataValues(); saveFile._exportMetaData._hdf5_DaimlerLidar = hdf5DL; } string dataPath = path_inp + "/" + sessionHandler.Session._sessionName + "SaveFile.dat"; using (Stream stream = File.Open(dataPath, FileMode.Create)) { var binaryFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); binaryFormatter.Serialize(stream, saveFile); } Debug.Log("Session Saved At: " + dataPath); }
public SessionSave() { _labelsession = new SessionSave_LabelSession(); _ingameOptions = new Sessionsave_MovementOptions(); _exportMetaData = new SessionSave_MetaData(); }