/* * WIP Saves the visible chunks to file */ public void SaveChunks(string worldName) { //Gets all of the saved chunk files DirectoryInfo dir = new DirectoryInfo(Application.persistentDataPath); FileInfo[] savedChunks = dir.GetFiles("*.dat*"); SaveLoadData saveLoadData = new SaveLoadData(); foreach (KeyValuePair <Vector2, Chunk> chunk in chunks) { float x = chunk.Key.x; float y = chunk.Key.y; //Saves the current chunk saveLoadData.SaveChunk(x, y, chunk.Value, worldName); } }