From 6da3dff5de4e75b51c4ce130e4ac8cca039c7541 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 14 Mar 2022 20:32:10 +0100 Subject: [PATCH] Fix editor options startup to not log error on missing file --- Source/Editor/Options/OptionsModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Options/OptionsModule.cs b/Source/Editor/Options/OptionsModule.cs index 0c22759aa..410a369b4 100644 --- a/Source/Editor/Options/OptionsModule.cs +++ b/Source/Editor/Options/OptionsModule.cs @@ -93,6 +93,11 @@ namespace FlaxEditor.Options public void Load() { Editor.Log("Loading editor options"); + if (!File.Exists(_optionsFilePath)) + { + Editor.LogWarning("Missing editor settings"); + return; + } try { @@ -100,12 +105,12 @@ namespace FlaxEditor.Options var asset = FlaxEngine.Content.LoadAsync(_optionsFilePath); if (asset == null) { - Editor.LogWarning("Missing or invalid editor settings"); + Editor.LogWarning("Invalid editor settings"); return; } if (asset.WaitForLoaded()) { - Editor.LogWarning("Failed to load editor settings"); + Editor.LogError("Failed to load editor settings"); return; }