From f96c39bc121cf47a726d0e21f818cd13e9a0e838 Mon Sep 17 00:00:00 2001 From: Zhang Xianbing Date: Wed, 13 May 2026 18:33:17 +0800 Subject: [PATCH] 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" },