From ae87e3f3b2c6918c0d2dc1c7c5bee296f9a54d17 Mon Sep 17 00:00:00 2001 From: David Sarno Date: Mon, 11 Aug 2025 17:26:51 -0700 Subject: [PATCH] read_console: remove dead types.Contains("all") branch; compute want directly from unityType (Exception/Assert treated as errors) --- UnityMcpBridge/Editor/Tools/ReadConsole.cs | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/UnityMcpBridge/Editor/Tools/ReadConsole.cs b/UnityMcpBridge/Editor/Tools/ReadConsole.cs index cbeb4e4..4bd4009 100644 --- a/UnityMcpBridge/Editor/Tools/ReadConsole.cs +++ b/UnityMcpBridge/Editor/Tools/ReadConsole.cs @@ -274,25 +274,18 @@ namespace UnityMcpBridge.Editor.Tools } bool want; - if (types.Contains("all")) + // Treat Exception/Assert as errors for filtering convenience + if (unityType == LogType.Exception) { - want = true; + want = types.Contains("error") || types.Contains("exception"); + } + else if (unityType == LogType.Assert) + { + want = types.Contains("error") || types.Contains("assert"); } else { - // Treat Exception/Assert as errors for filtering convenience - if (unityType == LogType.Exception) - { - want = types.Contains("error") || types.Contains("exception"); - } - else if (unityType == LogType.Assert) - { - want = types.Contains("error") || types.Contains("assert"); - } - else - { - want = types.Contains(unityType.ToString().ToLowerInvariant()); - } + want = types.Contains(unityType.ToString().ToLowerInvariant()); } if (!want) continue;