unity-mcp icon indicating copy to clipboard operation
unity-mcp copied to clipboard

UnityMCP always returns 0 log entries.

Open alpenstorm opened this issue 1 year ago • 4 comments

Every time Claude Code accesses the read_console tool from UnityMCP, the tool use is successful, but the message states that it hasn't retrieved any log entries.

alpenstorm avatar Jul 12 '25 11:07 alpenstorm

Can you specify the log and what it prints out? I am using Claude Desktop and it works fine on my end.

Image

Scriptwonder avatar Jul 12 '25 20:07 Scriptwonder

I will when I get back to my computer.

alpenstorm avatar Jul 14 '25 08:07 alpenstorm

For some reason, it's working now...

alpenstorm avatar Jul 14 '25 12:07 alpenstorm

I have this occasionally. Sometimes the MCP in unity returns 0 results when it queries the log. unityMCP - read_console (MCP)(action: "get", types: ["error"], count: 5) ⎿  {
"success": true, "message": "Retrieved 0 log entries.", "data": [] }

Running the request a second time sometimes fixes it and it retuns the correct logs from the unity editor. Not a deal breaker but it does lead Claude to believe it has been successful when the unity error contains many errors still!

Something to note is that the second read_console gets types of "error" and "warning" and this returns the errors. I think it's something to do with only fetching the errors that means it returns 0 results.

clockworkant avatar Jul 28 '25 07:07 clockworkant