diff --git a/GlitchyEditor/src/EditorLayer.bf b/GlitchyEditor/src/EditorLayer.bf index f3a0ee2..01d6518 100644 --- a/GlitchyEditor/src/EditorLayer.bf +++ b/GlitchyEditor/src/EditorLayer.bf @@ -818,6 +818,9 @@ namespace GlitchyEditor private void OnScenePlay() { Log.EngineLogger.AssertDebug(_scriptSerializer.SerializedObjectCount == 0, "Somehow some entities are serialized."); + + if (Application.Instance.Settings.EditorSettings.ClearLogOnPlay) + Editor.Instance.LogWindow.ClearLog(); _scriptSerializer.SerializeScriptInstances(); diff --git a/GlitchyEditor/src/EditorSettings.bf b/GlitchyEditor/src/EditorSettings.bf index 77741be..e76ec0f 100644 --- a/GlitchyEditor/src/EditorSettings.bf +++ b/GlitchyEditor/src/EditorSettings.bf @@ -194,6 +194,9 @@ class EditorSettings [Setting("Editor", "Switch to Editor on pause", "If checked the editor will automatically switch to the \"Editor\" window when the game is being paused."), BonInclude] public bool SwitchToEditorOnPause = false; + [Setting("Editor", "Clear log on play", "If checked the message log will be cleared when the play-mode is entered."), BonInclude] + public bool ClearLogOnPlay = true; + [BonInclude] private List _recentProjects ~ DeleteContainerAndItems!(_);