Skip to content

Unity Editor is not running at the specified project root #838

@daidaoshiwei

Description

@daidaoshiwei

Title: Unity Editor detected by list_unity_project_roots but get_unity_editor_state / get_unity_logs fail with "Unity Editor is not running at the specified project root"

Environment:

  • OS: Windows 10 (win32 10.0.17763)
  • Unity project path: E:\NewClient\ReleaseCold
  • MCP For Unity: v9.4.7 (HTTPLocal, URL http://127.0.0.1:8080, Session Active)
  • Cursor + coplay-mcp: coplay-mcp-server (Python 3.11, installed as shown in Cursor MCP panel)

Minimal Repro Steps:

  1. Open the Unity project located at E:\NewClient\ReleaseCold in the Unity Editor.
  2. In Unity, open the “MCP For Unity” window and start the local server:
    • Transport: HTTPLocal
    • HTTP URL: http://127.0.0.1:8080
    • Ensure the status shows: “Session Active (ReleaseCold)”.
  3. In Cursor, enable the coplay-mcp server.
  4. From Cursor, call the set_unity_project_root tool with:
    • unity_project_root = "E:\\NewClient\\ReleaseCold"
      This call succeeds and returns:
      Unity project root set to: E:\NewClient\ReleaseCold
  5. From Cursor, call the list_unity_project_roots tool with empty arguments:
    • This call succeeds and returns something like:
      {
      "count": 1,
      "projectRoots": [
      {
      "projectRoot": "E:\NewClient\ReleaseCold",
      "projectName": "ReleaseCold"
      }
      ]
      }
      So the MCP server clearly detects one running Unity instance at the expected project root.
  6. Now call the get_unity_editor_state tool with empty arguments.
  7. Also try calling the get_unity_logs tool with:
    • {"limit": 20, "show_logs": true, "show_warnings": true, "show_errors": true, "show_stack_traces": false}

Observed Behavior:

  • Both get_unity_editor_state and get_unity_logs fail with the same error:
    Unity Editor is not running at the specified project root
  • Other tools that only set or query configuration (such as set_unity_project_root and list_unity_project_roots) work as expected.

Expected Behavior:

  • Since list_unity_project_roots successfully detects a running Unity instance with:
    • projectRoot = E:\NewClient\ReleaseCold
    • projectName = ReleaseCold
      and this matches the configured unity_project_root, calls to get_unity_editor_state and get_unity_logs should succeed and return the current editor state / console logs, instead of reporting that the Unity Editor is not running.

Additional Notes:

  • This suggests that the internal check used by get_unity_editor_state / get_unity_logs to validate that "the Unity Editor is running at the specified project root" may be stricter or inconsistent with the logic used by list_unity_project_roots.
  • It might be comparing paths in a way that fails on Windows (e.g., different path normalization, case sensitivity, or drive letter handling), even though the project root strings look identical in the tool outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions