Skip to content

Commit ae87e3f

Browse files
committed
read_console: remove dead types.Contains("all") branch; compute want directly from unityType (Exception/Assert treated as errors)
1 parent 46f616d commit ae87e3f

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

UnityMcpBridge/Editor/Tools/ReadConsole.cs

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -274,25 +274,18 @@ bool includeStacktrace
274274
}
275275

276276
bool want;
277-
if (types.Contains("all"))
277+
// Treat Exception/Assert as errors for filtering convenience
278+
if (unityType == LogType.Exception)
279+
{
280+
want = types.Contains("error") || types.Contains("exception");
281+
}
282+
else if (unityType == LogType.Assert)
278283
{
279-
want = true;
284+
want = types.Contains("error") || types.Contains("assert");
280285
}
281286
else
282287
{
283-
// Treat Exception/Assert as errors for filtering convenience
284-
if (unityType == LogType.Exception)
285-
{
286-
want = types.Contains("error") || types.Contains("exception");
287-
}
288-
else if (unityType == LogType.Assert)
289-
{
290-
want = types.Contains("error") || types.Contains("assert");
291-
}
292-
else
293-
{
294-
want = types.Contains(unityType.ToString().ToLowerInvariant());
295-
}
288+
want = types.Contains(unityType.ToString().ToLowerInvariant());
296289
}
297290

298291
if (!want) continue;

0 commit comments

Comments
 (0)