Skip to content

Commit 97048ae

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix/multi-instance
2 parents 5e3a035 + 5e4b554 commit 97048ae

File tree

176 files changed

+43
-27170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+43
-27170
lines changed

MCPForUnity/Editor/Dependencies/DependencyManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static void GenerateRecommendations(DependencyCheckResult result, IPlatf
126126
{
127127
if (dep.Name == "Python")
128128
{
129-
result.RecommendedActions.Add($"Install Python 3.11+ from: {detector.GetPythonInstallUrl()}");
129+
result.RecommendedActions.Add($"Install Python 3.10+ from: {detector.GetPythonInstallUrl()}");
130130
}
131131
else if (dep.Name == "UV Package Manager")
132132
{

MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public override DependencyStatus DetectPython()
6262
}
6363
}
6464

65-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
65+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
6666
status.Details = "Checked common installation paths including system, snap, and user-local locations.";
6767
}
6868
catch (Exception ex)
@@ -144,10 +144,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
144144
version = output.Substring(7); // Remove "Python " prefix
145145
fullPath = pythonPath;
146146

147-
// Validate minimum version (Python 4+ or Python 3.11+)
147+
// Validate minimum version (Python 4+ or Python 3.10+)
148148
if (TryParseVersion(version, out var major, out var minor))
149149
{
150-
return major > 3 || (major >= 3 && minor >= 11);
150+
return major > 3 || (major >= 3 && minor >= 10);
151151
}
152152
}
153153
}

MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ public override DependencyStatus DetectPython()
3333
"/usr/bin/python3",
3434
"/usr/local/bin/python3",
3535
"/opt/homebrew/bin/python3",
36+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
3637
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
3738
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
38-
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
39+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
40+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
3941
};
4042

4143
foreach (var candidate in candidates)
@@ -64,7 +66,7 @@ public override DependencyStatus DetectPython()
6466
}
6567
}
6668

67-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
69+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
6870
status.Details = "Checked common installation paths including Homebrew, Framework, and system locations.";
6971
}
7072
catch (Exception ex)
@@ -143,10 +145,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
143145
version = output.Substring(7); // Remove "Python " prefix
144146
fullPath = pythonPath;
145147

146-
// Validate minimum version (Python 4+ or Python 3.11+)
148+
// Validate minimum version (Python 4+ or Python 3.10+)
147149
if (TryParseVersion(version, out var major, out var minor))
148150
{
149-
return major > 3 || (major >= 3 && minor >= 11);
151+
return major > 3 || (major >= 3 && minor >= 10);
150152
}
151153
}
152154
}

MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,26 @@ public override DependencyStatus DetectPython()
3030
{
3131
"python.exe",
3232
"python3.exe",
33+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
34+
"Programs", "Python", "Python314", "python.exe"),
3335
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3436
"Programs", "Python", "Python313", "python.exe"),
3537
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3638
"Programs", "Python", "Python312", "python.exe"),
3739
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3840
"Programs", "Python", "Python311", "python.exe"),
41+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
42+
"Programs", "Python", "Python310", "python.exe"),
43+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
44+
"Python314", "python.exe"),
3945
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
4046
"Python313", "python.exe"),
4147
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
42-
"Python312", "python.exe")
48+
"Python312", "python.exe"),
49+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
50+
"Python311", "python.exe"),
51+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
52+
"Python310", "python.exe")
4353
};
4454

4555
foreach (var candidate in candidates)
@@ -68,7 +78,7 @@ public override DependencyStatus DetectPython()
6878
}
6979
}
7080

71-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
81+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
7282
status.Details = "Checked common installation paths and PATH environment variable.";
7383
}
7484
catch (Exception ex)
@@ -94,7 +104,7 @@ public override string GetInstallationRecommendations()
94104
return @"Windows Installation Recommendations:
95105
96106
1. Python: Install from Microsoft Store or python.org
97-
- Microsoft Store: Search for 'Python 3.12' or 'Python 3.13'
107+
- Microsoft Store: Search for 'Python 3.10' or higher
98108
- Direct download: https://python.org/downloads/windows/
99109
100110
2. UV Package Manager: Install via PowerShell
@@ -132,10 +142,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
132142
version = output.Substring(7); // Remove "Python " prefix
133143
fullPath = pythonPath;
134144

135-
// Validate minimum version (Python 4+ or Python 3.11+)
145+
// Validate minimum version (Python 4+ or Python 3.10+)
136146
if (TryParseVersion(version, out var major, out var minor))
137147
{
138-
return major > 3 || (major >= 3 && minor >= 11);
148+
return major > 3 || (major >= 3 && minor >= 10);
139149
}
140150
}
141151
}

MCPForUnity/Editor/Helpers/ServerInstaller.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,12 @@ internal static string FindUvPath()
733733
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),
734734

735735
// Common per-user installs
736+
Path.Combine(localAppData, @"Programs\Python\Python314\Scripts\uv.exe"),
736737
Path.Combine(localAppData, @"Programs\Python\Python313\Scripts\uv.exe"),
737738
Path.Combine(localAppData, @"Programs\Python\Python312\Scripts\uv.exe"),
738739
Path.Combine(localAppData, @"Programs\Python\Python311\Scripts\uv.exe"),
739740
Path.Combine(localAppData, @"Programs\Python\Python310\Scripts\uv.exe"),
741+
Path.Combine(appData, @"Python\Python314\Scripts\uv.exe"),
740742
Path.Combine(appData, @"Python\Python313\Scripts\uv.exe"),
741743
Path.Combine(appData, @"Python\Python312\Scripts\uv.exe"),
742744
Path.Combine(appData, @"Python\Python311\Scripts\uv.exe"),
@@ -761,8 +763,11 @@ internal static string FindUvPath()
761763
Path.Combine(home, ".local", "bin", "uv"),
762764
"/opt/homebrew/opt/uv/bin/uv",
763765
// Framework Python installs
766+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/uv",
764767
"/Library/Frameworks/Python.framework/Versions/3.13/bin/uv",
765768
"/Library/Frameworks/Python.framework/Versions/3.12/bin/uv",
769+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/uv",
770+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/uv",
766771
// Fallback to PATH resolution by name
767772
"uv"
768773
};

MCPForUnity/Editor/Services/PathResolverService.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@ public bool IsPythonDetected()
7676
// Common Windows Python installation paths
7777
string[] windowsCandidates =
7878
{
79+
@"C:\Python314\python.exe",
7980
@"C:\Python313\python.exe",
8081
@"C:\Python312\python.exe",
8182
@"C:\Python311\python.exe",
8283
@"C:\Python310\python.exe",
83-
@"C:\Python39\python.exe",
84+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python314\python.exe"),
8485
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python313\python.exe"),
8586
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python312\python.exe"),
8687
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python311\python.exe"),
8788
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python310\python.exe"),
88-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python39\python.exe"),
89+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python314\python.exe"),
8990
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python313\python.exe"),
9091
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python312\python.exe"),
9192
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python311\python.exe"),
9293
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python310\python.exe"),
93-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python39\python.exe"),
9494
};
9595

9696
foreach (string c in windowsCandidates)
@@ -134,8 +134,11 @@ public bool IsPythonDetected()
134134
"/usr/bin/python3",
135135
"/opt/local/bin/python3",
136136
Path.Combine(home, ".local", "bin", "python3"),
137+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
137138
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
138139
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
140+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
141+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3",
139142
};
140143
foreach (string c in candidates)
141144
{

MCPForUnity/Editor/Setup/SetupWizardWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void DrawSetupStep()
120120
{
121121
// Only show critical warnings when dependencies are actually missing
122122
EditorGUILayout.HelpBox(
123-
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.11+ and UV package manager to function properly.",
123+
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.10+ and UV package manager to function properly.",
124124
MessageType.Warning
125125
);
126126

README-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[![Discord](https://img.shields.io/badge/discord-join-red.svg?logo=discord&logoColor=white)](https://discord.gg/y4p8KfzrN4)
99
[![](https://img.shields.io/badge/Unity-000000?style=flat&logo=unity&logoColor=blue 'Unity')](https://unity.com/releases/editor/archive)
10-
[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
10+
[![python](https://img.shields.io/badge/Python-3.10+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
1111
[![](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction)
1212
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/CoplayDev/unity-mcp)
1313
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/CoplayDev/unity-mcp)
@@ -68,7 +68,7 @@ MCP for Unity 使用两个组件连接您的工具:
6868

6969
### 前置要求
7070

71-
* **Python:** 版本 3.12 或更新。[下载 Python](https://www.python.org/downloads/)
71+
* **Python:** 版本 3.10 或更新。[下载 Python](https://www.python.org/downloads/)
7272
* **Unity Hub 和编辑器:** 版本 2021.3 LTS 或更新。[下载 Unity](https://unity.com/download)
7373
* **uv(Python 工具链管理器):**
7474
```bash

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Discord](https://img.shields.io/badge/discord-join-red.svg?logo=discord&logoColor=white)](https://discord.gg/y4p8KfzrN4)
99
[![](https://img.shields.io/badge/Website-Visit-purple)](https://www.coplay.dev/?ref=unity-mcp)
1010
[![](https://img.shields.io/badge/Unity-000000?style=flat&logo=unity&logoColor=blue 'Unity')](https://unity.com/releases/editor/archive)
11-
[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
11+
[![python](https://img.shields.io/badge/Python-3.10+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
1212
[![](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction)
1313
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/CoplayDev/unity-mcp)
1414
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/CoplayDev/unity-mcp)
@@ -18,7 +18,7 @@
1818

1919
MCP for Unity acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local **MCP (Model Context Protocol) Client**. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
2020

21-
![MCP for Unity](docs/images/readme_ui.png)
21+
<img width="406" height="704" alt="MCP for Unity screenshot" src="docs/images/readme_ui.png">
2222

2323
---
2424

@@ -80,7 +80,7 @@ MCP for Unity connects your tools using two components:
8080

8181
### Prerequisites
8282

83-
* **Python:** Version 3.11 or newer. [Download Python](https://www.python.org/downloads/)
83+
* **Python:** Version 3.10 or newer. [Download Python](https://www.python.org/downloads/)
8484
* **Unity Hub & Editor:** Version 2021.3 LTS or newer. [Download Unity](https://unity.com/download)
8585
* **uv (Python toolchain manager):**
8686
```bash

Server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MCP for Unity Server
22

33
[![MCP](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction)
4-
[![python](https://img.shields.io/badge/Python-3.11+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
4+
[![python](https://img.shields.io/badge/Python-3.10+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
55
[![License](https://img.shields.io/badge/License-MIT-red.svg 'MIT License')](https://opensource.org/licenses/MIT)
66
[![Discord](https://img.shields.io/badge/discord-join-red.svg?logo=discord&logoColor=white)](https://discord.gg/y4p8KfzrN4)
77

0 commit comments

Comments
 (0)