Console read fails to retrieve Assert Error log entries
Closed this issue · 3 comments
ibytergj commented
Having an issue with
“com.coplaydev.unity-mcp": "https://github.com/dsarno/unity-mcp.git?path=/UnityMcpBridge#feat/bridge-stability“
Where only messages and warnings are retrieved via the read console command - errors are not returned.

ibytergj commented
So to follow up the issue appears be incomplete support for Assert Type error logs. If these types of errors could be retrieved from the Unity console that would be useful for complete log support.
// Apply the observed "one level lower" correction
switch (initialType)
{
case LogType.Error:
return LogType.Warning; // Error becomes Warning
case LogType.Warning:
return LogType.Log; // Warning becomes Log
case LogType.Assert:
return LogType.Assert; // Assert remains Assert (no lower level defined)
case LogType.Log:
return LogType.Log; // Log remains Log
default:
return LogType.Log; // Default fallback
}
"""Gets messages from or clears the Unity Editor console.
Args:
ctx: The MCP context.
action: Operation ('get' or 'clear').
types: Message types to get **('error', 'warning', 'log', 'all').**
count: Max messages to return.
filter_text: Text filter for messages.
since_timestamp: Get messages after this timestamp (ISO 8601).
format: Output format ('plain', 'detailed', 'json').
include_stacktrace: Include stack traces in output.
Returns:
Dictionary with results. For 'get', includes 'data' (messages).
"""