Skip to content

Commit 8caa027

Browse files
authored
Merge branch 'CoplayDev:main' into main
2 parents f37f534 + 2126745 commit 8caa027

File tree

387 files changed

+14285
-20294
lines changed

Some content is hidden

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

387 files changed

+14285
-20294
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Server/build
2+
.git
3+
.venv
4+
__pycache__
5+
*.pyc
6+
.DS_Store

.github/workflows/bump-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ jobs:
6767
jq ".version = \"${NEW_VERSION}\"" MCPForUnity/package.json > MCPForUnity/package.json.tmp
6868
mv MCPForUnity/package.json.tmp MCPForUnity/package.json
6969
70-
echo "Updating MCPForUnity/UnityMcpServer~/src/pyproject.toml to $NEW_VERSION"
71-
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "MCPForUnity/UnityMcpServer~/src/pyproject.toml"
70+
echo "Updating Server/pyproject.toml to $NEW_VERSION"
71+
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "Server/pyproject.toml"
7272
73-
echo "Updating MCPForUnity/UnityMcpServer~/src/server_version.txt to $NEW_VERSION"
74-
echo "$NEW_VERSION" > "MCPForUnity/UnityMcpServer~/src/server_version.txt"
73+
echo "Updating Server/README.md version references to v$NEW_VERSION"
74+
sed -i 's|git+https://github.com/CoplayDev/unity-mcp@v[0-9]\+\.[0-9]\+\.[0-9]\+#subdirectory=Server|git+https://github.com/CoplayDev/unity-mcp@v'"$NEW_VERSION"'#subdirectory=Server|g' Server/README.md
7575
7676
- name: Commit and push changes
7777
env:
@@ -81,7 +81,7 @@ jobs:
8181
set -euo pipefail
8282
git config user.name "GitHub Actions"
8383
git config user.email "actions@github.com"
84-
git add MCPForUnity/package.json "MCPForUnity/UnityMcpServer~/src/pyproject.toml" "MCPForUnity/UnityMcpServer~/src/server_version.txt"
84+
git add MCPForUnity/package.json "Server/pyproject.toml" Server/README.md
8585
if git diff --cached --quiet; then
8686
echo "No version changes to commit."
8787
else

.github/workflows/claude-nl-suite.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,13 @@ jobs:
5555
uv venv
5656
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV"
5757
echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH"
58-
if [ -f MCPForUnity/UnityMcpServer~/src/pyproject.toml ]; then
59-
uv pip install -e MCPForUnity/UnityMcpServer~/src
60-
elif [ -f MCPForUnity/UnityMcpServer~/src/requirements.txt ]; then
61-
uv pip install -r MCPForUnity/UnityMcpServer~/src/requirements.txt
62-
elif [ -f MCPForUnity/UnityMcpServer~/pyproject.toml ]; then
63-
uv pip install -e MCPForUnity/UnityMcpServer~/
64-
elif [ -f MCPForUnity/UnityMcpServer~/requirements.txt ]; then
65-
uv pip install -r MCPForUnity/UnityMcpServer~/requirements.txt
58+
if [ -f Server/pyproject.toml ]; then
59+
uv pip install -e Server
60+
elif [ -f Server/requirements.txt ]; then
61+
uv pip install -r Server/requirements.txt
62+
else
63+
echo "No MCP Python deps found (skipping)"
64+
fi
6665
else
6766
echo "No MCP Python deps found (skipping)"
6867
fi
@@ -217,7 +216,7 @@ jobs:
217216
-stackTraceLogType Full \
218217
-projectPath /workspace/TestProjects/UnityMCPTests \
219218
"${manual_args[@]}" \
220-
-executeMethod MCPForUnity.Editor.MCPForUnityBridge.StartAutoConnect
219+
-executeMethod MCPForUnity.Editor.Services.Transport.Transports.StdioBridgeHost.StartAutoConnect
221220
222221
# ---------- Wait for Unity bridge ----------
223222
- name: Wait for Unity bridge (robust)
@@ -285,7 +284,7 @@ jobs:
285284
"mcpServers": {
286285
"unity": {
287286
"command": "uv",
288-
"args": ["run","--active","--directory","MCPForUnity/UnityMcpServer~/src","python","server.py"],
287+
"args": ["run","--active","--directory","Server","python","server.py"],
289288
"transport": { "type": "stdio" },
290289
"env": {
291290
"PYTHONUNBUFFERED": "1",

.github/workflows/python-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: ["**"]
66
paths:
7-
- MCPForUnity/UnityMcpServer~/src/**
7+
- Server/**
88
- .github/workflows/python-tests.yml
99
workflow_dispatch: {}
1010

@@ -26,13 +26,13 @@ jobs:
2626

2727
- name: Install dependencies
2828
run: |
29-
cd MCPForUnity/UnityMcpServer~/src
29+
cd Server
3030
uv sync
3131
uv pip install -e ".[dev]"
3232
3333
- name: Run tests
3434
run: |
35-
cd MCPForUnity/UnityMcpServer~/src
35+
cd Server
3636
uv run pytest tests/ -v --tb=short
3737
3838
- name: Upload test results
@@ -41,5 +41,5 @@ jobs:
4141
with:
4242
name: pytest-results
4343
path: |
44-
MCPForUnity/UnityMcpServer~/src/.pytest_cache/
45-
MCPForUnity/UnityMcpServer~/src/tests/
44+
Server/.pytest_cache/
45+
Server/tests/

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ build/
1616
dist/
1717
wheels/
1818
*.egg-info
19-
UnityMcpServer/**/*.meta
20-
UnityMcpServer.meta
2119

2220
# Virtual environments
2321
.venv

MCPForUnity/Editor/Importers.meta renamed to MCPForUnity/Editor/Clients.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TestProjects/UnityMCPTests/Assets/Temp.meta renamed to MCPForUnity/Editor/Clients/Configurators.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using MCPForUnity.Editor.Constants;
5+
using MCPForUnity.Editor.Models;
6+
using UnityEditor;
7+
8+
namespace MCPForUnity.Editor.Clients.Configurators
9+
{
10+
public class AntigravityConfigurator : JsonFileMcpConfigurator
11+
{
12+
public AntigravityConfigurator() : base(new McpClient
13+
{
14+
name = "Antigravity",
15+
windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity", "mcp_config.json"),
16+
macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity", "mcp_config.json"),
17+
linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".gemini", "antigravity", "mcp_config.json"),
18+
HttpUrlProperty = "serverUrl",
19+
DefaultUnityFields = { { "disabled", false } },
20+
StripEnvWhenNotRequired = true
21+
})
22+
{ }
23+
24+
public override IList<string> GetInstallationSteps() => new List<string>
25+
{
26+
"Open Antigravity",
27+
"Click the more_horiz menu in the Agent pane > MCP Servers",
28+
"Select 'Install' for Unity MCP or use the Configure button above",
29+
"Restart Antigravity if necessary"
30+
};
31+
}
32+
}

MCPForUnity/Editor/Helpers/McpPathResolver.cs.meta renamed to MCPForUnity/Editor/Clients/Configurators/AntigravityConfigurator.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System.Collections.Generic;
2+
using MCPForUnity.Editor.Models;
3+
4+
namespace MCPForUnity.Editor.Clients.Configurators
5+
{
6+
public class ClaudeCodeConfigurator : ClaudeCliMcpConfigurator
7+
{
8+
public ClaudeCodeConfigurator() : base(new McpClient
9+
{
10+
name = "Claude Code",
11+
windowsConfigPath = string.Empty,
12+
macConfigPath = string.Empty,
13+
linuxConfigPath = string.Empty,
14+
})
15+
{ }
16+
17+
public override IList<string> GetInstallationSteps() => new List<string>
18+
{
19+
"Ensure Claude CLI is installed",
20+
"Use the Register button to register automatically\nOR manually run: claude mcp add UnityMCP",
21+
"Restart Claude Code"
22+
};
23+
}
24+
}

0 commit comments

Comments
 (0)