Skip to content

"Failed to Start WebSocket Server: Socket Address Already in Use After Code Compilation in UnityEditor" #39

Open
@torsilver

Description

@torsilver

When I modify the code, UnityEditor recompiles it, and then the Console reports the following error:

[MCP Unity] Failed to start WebSocket server: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。

UnityEngine.Debug:LogError (object)
McpUnity.Utils.McpLogger:LogError (string) (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/Utils/Logger.cs:40)
McpUnity.Unity.McpUnityServer:StartServer () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityServer.cs:106)
McpUnity.Unity.McpUnityEditorWindow:DrawServerTab () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityEditorWindow.cs:153)
McpUnity.Unity.McpUnityEditorWindow:OnGUI () (at ./Library/PackageCache/com.gamelovers.mcp-unity@cb4b03c1c9/Editor/UnityBridge/McpUnityEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Afterward, the MCP in the Cursor stops working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions