From fd6934e068931668897c0753820e9fa5462913e3 Mon Sep 17 00:00:00 2001 From: whatevertogo Date: Mon, 23 Feb 2026 16:16:39 +0800 Subject: [PATCH] fix: add pyenv shims to PATH on macOS When Unity is launched from Dock/Spotlight on macOS, GUI applications do not inherit the shell's PATH from .zshrc/.bashrc. This caused MCP for Unity to fail finding Python installed via pyenv. Add ~/.pyenv/shims to the augmented PATH in MacOSPlatformDetector so Python can be found regardless of how Unity is launched. Fixes #812 Co-Authored-By: Claude Opus 4.6 --- .../Dependencies/PlatformDetectors/MacOSPlatformDetector.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs b/MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs index b162f11ae..2c06219f5 100644 --- a/MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs +++ b/MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs @@ -188,6 +188,7 @@ private string[] GetPathAdditions() var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); return new[] { + Path.Combine(homeDir, ".pyenv", "shims"), // pyenv: Python/uv when Unity is launched from Dock/Spotlight "/opt/homebrew/bin", "/usr/local/bin", "/usr/bin",