Merge branch 'main' into feat/bridge-stability
commit
b179ce1ed8
|
|
@ -1,15 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: justinpbarnett # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
|
@ -53,6 +53,7 @@ X:\UnityProject\Library\PackageCache\com.coplaydev.unity-mcp@<version-or-hash>
|
|||
Example (hash):
|
||||
```
|
||||
X:\UnityProject\Library\PackageCache\com.coplaydev.unity-mcp@272123cfd97e
|
||||
|
||||
```
|
||||
|
||||
To find it reliably:
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ Connect your MCP Client (Claude, Cursor, etc.) to the Python server you installe
|
|||
2. Click `Auto-Setup`.
|
||||
3. Look for a green status indicator 🟢 and "Connected ✓". *(This attempts to modify the MCP Client\'s config file automatically)*.
|
||||
|
||||
|
||||
**Option B: Manual Configuration**
|
||||
|
||||
If Auto-Setup fails or you use a different client:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace UnityMcpBridge.Editor.Helpers
|
|||
{
|
||||
private const string RootFolder = "UnityMCP";
|
||||
private const string ServerFolder = "UnityMcpServer";
|
||||
|
||||
/// <summary>
|
||||
/// Ensures the unity-mcp-server is installed locally by copying from the embedded package source.
|
||||
/// No network calls or Git operations are performed.
|
||||
|
|
@ -135,19 +136,31 @@ namespace UnityMcpBridge.Editor.Helpers
|
|||
catch { /* ignore */ }
|
||||
|
||||
// 2) Installed package: resolve via Package Manager
|
||||
try
|
||||
{
|
||||
// 2) Installed package: resolve via Package Manager (support new + legacy IDs, warn on legacy)
|
||||
try
|
||||
{
|
||||
var list = UnityEditor.PackageManager.Client.List();
|
||||
while (!list.IsCompleted) { }
|
||||
if (list.Status == UnityEditor.PackageManager.StatusCode.Success)
|
||||
{
|
||||
const string CurrentId = "com.coplaydev.unity-mcp";
|
||||
const string LegacyId = "com.justinpbarnett.unity-mcp";
|
||||
|
||||
foreach (var pkg in list.Result)
|
||||
{
|
||||
if (pkg.name == "com.justinpbarnett.unity-mcp")
|
||||
if (pkg.name == CurrentId || pkg.name == LegacyId)
|
||||
{
|
||||
if (pkg.name == LegacyId)
|
||||
{
|
||||
Debug.LogWarning(
|
||||
"UnityMCP: Detected legacy package id 'com.justinpbarnett.unity-mcp'. " +
|
||||
"Please update Packages/manifest.json to 'com.coplaydev.unity-mcp' to avoid future breakage."
|
||||
);
|
||||
}
|
||||
|
||||
string packagePath = pkg.resolvedPath; // e.g., Library/PackageCache/... or local path
|
||||
|
||||
// Preferred: UnityMcpServer~ embedded alongside Editor/Runtime within the package (ignored by Unity import)
|
||||
// Preferred: tilde folder embedded alongside Editor/Runtime within the package
|
||||
string embeddedTilde = Path.Combine(packagePath, "UnityMcpServer~", "src");
|
||||
if (Directory.Exists(embeddedTilde) && File.Exists(Path.Combine(embeddedTilde, "server.py")))
|
||||
{
|
||||
|
|
@ -173,7 +186,8 @@ namespace UnityMcpBridge.Editor.Helpers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch { /* ignore */ }
|
||||
|
||||
// 3) Fallback to previous common install locations
|
||||
|
|
|
|||
|
|
@ -996,7 +996,7 @@ namespace UnityMcpBridge.Editor.Windows
|
|||
{
|
||||
foreach (UnityEditor.PackageManager.PackageInfo package in request.Result)
|
||||
{
|
||||
if (package.name == "com.justinpbarnett.unity-mcp")
|
||||
if (package.name == "com.coplaydev.unity-mcp")
|
||||
{
|
||||
string packagePath = package.resolvedPath;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue