Clear log on play option

This commit is contained in:
Simon Lübeß
2024-06-23 18:58:40 +02:00
parent bbbbe833df
commit b96f195afb
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -818,6 +818,9 @@ namespace GlitchyEditor
private void OnScenePlay() private void OnScenePlay()
{ {
Log.EngineLogger.AssertDebug(_scriptSerializer.SerializedObjectCount == 0, "Somehow some entities are serialized."); Log.EngineLogger.AssertDebug(_scriptSerializer.SerializedObjectCount == 0, "Somehow some entities are serialized.");
if (Application.Instance.Settings.EditorSettings.ClearLogOnPlay)
Editor.Instance.LogWindow.ClearLog();
_scriptSerializer.SerializeScriptInstances(); _scriptSerializer.SerializeScriptInstances();
+3
View File
@@ -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] [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; 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] [BonInclude]
private List<String> _recentProjects ~ DeleteContainerAndItems!(_); private List<String> _recentProjects ~ DeleteContainerAndItems!(_);