private void Save() { //save in thread so UI doesn't freeze Task.Run(() => { Structure structure = structureEditPanel.Save(); string filename = nameTextBox.text + STRUCTURE_FILE_EXTENSION; SaveLoad.Save(structure, filename); unsavedChanges = false; }); }
/// <summary> /// Saves the chunk to disk. /// </summary> public void Save() { Task.Run(() => SaveLoad.Save(this, GetFilename(x, y, world))); }