//Add or replace modified data for the given chunk public void StoreModifiedChunkData(Vector3Int chunkID, IChunkData data) { if (SaveUtils.DoSave) { //Save to file serialiser.Save(data.GetSaveData(), data.ChunkID.ToString()); } else { //Store in RAM ModifiedChunkData[chunkID] = data; } }
public void OnPlayClicked() { SaveUtils.WorldName = worldName; BinarySerialiser serialiser = new BinarySerialiser(SaveUtils.CurrentWorldSaveDirectory, ".seed"); serialiser.Save(seed, "worldSeed"); SceneMessagePasser.SetMessage(new SeedMessage() { seed = seed }); SceneManager.LoadScene(mainMenu.gameScene); }