Skip to content

read_console fails on Unity 6000.5.0a6: UnityEditor.LogEntry.instanceID is missing #761

@xchesh

Description

@xchesh

On Unity 6000.5.0a6, read_console fails to initialize and always returns:

ReadConsole handler failed to initialize due to reflection errors. Cannot access console logs.

Steps to reproduce:

  1. Install com.coplaydev.unity-mcp from UPM (clean install).
  2. Open project in Unity 6000.5.0a6.
  3. Call read_console with action=get, count=5.

Actual result:

  • read_console fails with reflection initialization error.

Expected result:

  • read_console returns console entries.

Environment:

  • Unity: 6000.5.0a6 (Unity 6.5 alpha)
  • OS: Windows
  • Package: com.coplaydev.unity-mcp 9.4.6 (UPM)

Suspected root cause:

  • ReadConsole reflects UnityEditor.LogEntry.instanceID, but this field is not available (or renamed, e.g. instanceId)
    in this Unity version.
  • Initialization currently treats missing instanceID as fatal, so the whole read_console tool becomes unavailable.
MCP-FOR-UNITY: [ReadConsole] Static Initialization Failed: Could not setup reflection for LogEntries/LogEntry. Console reading/clearing will likely fail. Specific Error: Failed to reflect LogEntry.instanceID
UnityEngine.Debug:LogError (object)
MCPForUnity.Editor.Helpers.McpLog:Error (string) (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Helpers/McpLog.cs:50)
MCPForUnity.Editor.Tools.ReadConsole:.cctor () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Tools/ReadConsole.cs:114)
MCPForUnity.Editor.Tools.CommandRegistry:ExecuteCommand (string,Newtonsoft.Json.Linq.JObject,System.Threading.Tasks.TaskCompletionSource`1<string>) (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Tools/CommandRegistry.cs:236)
MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher:ProcessCommand (string,MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher/PendingCommand) (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/TransportCommandDispatcher.cs:364)
MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher:ProcessQueue () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/TransportCommandDispatcher.cs:262)
MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher:<RequestMainThreadPump>g__Pump|11_0 () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/TransportCommandDispatcher.cs:184)
MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher:RequestMainThreadPump () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/TransportCommandDispatcher.cs:193)
MCPForUnity.Editor.Services.Transport.TransportCommandDispatcher:ExecuteCommandJsonAsync (string,System.Threading.CancellationToken) (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/TransportCommandDispatcher.cs:116)
MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost/<>c__DisplayClass48_0/<<ExecuteQueuedCommand>g__Runner|0>d:MoveNext () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/Transports/StdioBridgeHost.cs:859)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost/<>c__DisplayClass48_0/<<ExecuteQueuedCommand>g__Runner|0>d> (MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost/<>c__DisplayClass48_0/<<ExecuteQueuedCommand>g__Runner|0>d&)
MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost/<>c__DisplayClass48_0:<ExecuteQueuedCommand>g__Runner|0 ()
MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost:ExecuteQueuedCommand (string,string,System.Threading.Tasks.TaskCompletionSource`1<string>) (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/Transports/StdioBridgeHost.cs:893)
MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost:ProcessCommands () (at ./Library/PackageCache/com.coplaydev.unity-mcp@67f1ae9e01f4/Editor/Services/Transport/Transports/StdioBridgeHost.cs:843)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions