Add error message box on Editor Options saving error

This commit is contained in:
Wojtek Figat
2021-04-20 21:04:05 +02:00
parent 8ba1affe9e
commit 02856273ad

View File

@@ -150,7 +150,10 @@ namespace FlaxEditor.Options
private void Save()
{
// Update file
Editor.SaveJsonAsset(_optionsFilePath, Options);
if (Editor.SaveJsonAsset(_optionsFilePath, Options))
{
MessageBox.Show(string.Format("Failed to save editor option to '{0}'. Ensure that directory exists and program has access to it.", _optionsFilePath), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
// Special case for editor analytics
var editorAnalyticsTrackingFile = Path.Combine(Editor.LocalCachePath, "noTracking");