From f96c39bc121cf47a726d0e21f818cd13e9a0e838 Mon Sep 17 00:00:00 2001 From: Zhang Xianbing Date: Wed, 13 May 2026 18:33:17 +0800 Subject: [PATCH 1/2] fix: declare required Unity module dependencies MCPForUnity.Runtime uses Texture2D.EncodeToPNG, Physics2D, and ScreenCapture APIs. Declaring their built-in modules prevents Unity projects that do not already enable those modules from failing script compilation. Co-authored-by: Codex --- MCPForUnity/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MCPForUnity/package.json b/MCPForUnity/package.json index bc01b39d8..2e29dcde3 100644 --- a/MCPForUnity/package.json +++ b/MCPForUnity/package.json @@ -7,6 +7,9 @@ "documentationUrl": "https://github.com/CoplayDev/unity-mcp", "licensesUrl": "https://github.com/CoplayDev/unity-mcp/blob/main/LICENSE", "dependencies": { + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", "com.unity.nuget.newtonsoft-json": "3.0.2", "com.unity.test-framework": "1.1.31" }, From ec9b22a4e1fe03ad7c0ee16dab51f846474c99e9 Mon Sep 17 00:00:00 2001 From: Shutong Wu <51266340+Scriptwonder@users.noreply.github.com> Date: Tue, 26 May 2026 15:35:26 +0800 Subject: [PATCH 2/2] Add new Unity module dependencies to package.json --- MCPForUnity/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MCPForUnity/package.json b/MCPForUnity/package.json index 2e29dcde3..a97a44f82 100644 --- a/MCPForUnity/package.json +++ b/MCPForUnity/package.json @@ -7,9 +7,13 @@ "documentationUrl": "https://github.com/CoplayDev/unity-mcp", "licensesUrl": "https://github.com/CoplayDev/unity-mcp/blob/main/LICENSE", "dependencies": { + "com.unity.modules.animation": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.physics": "1.0.0", "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.uielements": "1.0.0", "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.nuget.newtonsoft-json": "3.0.2", "com.unity.test-framework": "1.1.31" },