Commit Graph

91 Commits (b179ce1ed8f64e673acecf42be0c1678049f680b)

Author SHA1 Message Date
dsarno b179ce1ed8
Merge branch 'main' into feat/bridge-stability 2025-08-10 11:57:07 -07:00
David Sarno 07b35837b7 Bridge: deferred init, stop-before-reload, breadcrumb logs; stable rebinds.
Editor: auto-rewrite MCP client config when package path changes.

Server: heartbeat-aware retries, structured {state: reloading, retry_after_ms}, single auto-retry across tools; guard empty calls.

Repo: remove global *~ ignore (was hiding UnityMcpServer~), track tilde server folder (Unity still excludes it from assemblies).
2025-08-09 15:09:49 -07:00
David Sarno 32f513f10d Merge branch 'feat/bridge-stability' of https://github.com/dsarno/unity-mcp into feat/bridge-stability
* 'feat/bridge-stability' of https://github.com/dsarno/unity-mcp:
  Bridge logs: add bold blue UNITY-MCP prefix; gate PortManager logs behind Debug Logs toggle; improve Python and UV detection on Windows (flex versions, where.exe/Path scan); tidy installer messages
2025-08-09 13:00:26 -07:00
David Sarno 9da9739751 Package Python server under UnityMcpServer~; remove redundant .meta files; delete old root UnityMcpServer; update editor lookup for tilde path; adjust deploy/restore scripts; remove orphan meta 2025-08-09 12:49:32 -07:00
David Sarno c0de38e1e7 Merge upstream/main: CoplayDev rebrand with bridge stability improvements
This merge combines upstream's organizational rebrand and updates with
our comprehensive bridge stability improvements:

**From Upstream:**
- CoplayDev organizational rebrand (README, LICENSE, documentation)
- Updated logo and deployment scripts
- Python version pinning (.python-version file)

**From Our Branch (Preserved):**
- Comprehensive bridge stability improvements (threading, heartbeat, retries)
- Enhanced debugging and diagnostic features
- Embedded server installation approach (more reliable than git-based)
- Broader Python compatibility (>=3.10 vs >=3.12)
- Advanced port management with per-project persistence
- Auto-setup and connection reliability features
- Robust error handling and recovery mechanisms

**Key Technical Decisions:**
- Used our comprehensive UnityMcpBridge.cs (625 lines vs 473) with all stability features
- Maintained embedded server approach over upstream's git-based installer
- Preserved broader Python compatibility (>=3.10) for better accessibility
- Used our optimized connection settings and retry logic
- Kept our user-centric server installation approach (on-demand vs automatic)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-09 12:05:47 -07:00
dsarno 4c72309dc8 Bridge logs: add bold blue UNITY-MCP prefix; gate PortManager logs behind Debug Logs toggle; improve Python and UV detection on Windows (flex versions, where.exe/Path scan); tidy installer messages 2025-08-08 15:09:18 -07:00
David Sarno f24e124c15 MCP: Embedded server reliability and UX\n\n- Embed-first installer: copies embedded server, adds RepairPythonEnvironment() (deletes .venv, runs 'uv sync'); robust uv path discovery; macOS install path -> Application Support\n- UI: Server Status shows Installed(Embedded); Python missing warning with install link; Repair button tooltip; header Show Debug Logs; cleaned layout\n- Python: unpin .python-version; set requires-python >=3.10 in both pyprojects\n- Dev: improved package/dev path resolution 2025-08-08 14:16:25 -07:00
Marcus Sanatan 94df819e61 fix: update package name from com.CoplayDev.unity-mcp to com.coplaydev.unity-mcp to comply with Unity package naming standards 2025-08-08 15:13:47 -04:00
Marcus Sanatan 5d148a7462 chore: update repository URLs and package name to use correct CoplayDev casing and main branch 2025-08-08 15:06:35 -04:00
Marcus Sanatan 6faa55f825 chore: update package namespace from justinpbarnett to coplaydev 2025-08-08 14:59:30 -04:00
David Sarno 06f271926b feat(editor): 2x2 layout (Server/Bridge | Clients/Validation), Auto-Setup with Connected ✓ state; add Debug Logs toggle and gate verbose logs
fix(bridge): reuse stored port in StartAutoConnect; guard listener stop to avoid ObjectDisposedException

chore(clients): reorder dropdown to Cursor, Claude Code, Windsurf, Claude Desktop, VSCode
2025-08-08 11:23:45 -07:00
David Sarno 2f387d3417 chore(ui): rename 'Re-Run Client Setup' to 'Bind to Clients' 2025-08-08 10:49:01 -07:00
David Sarno 10903a2d48 fix(setup): reuse stored project port in StartAutoConnect to avoid port changes during client setup 2025-08-08 10:35:00 -07:00
David Sarno f4bc7cd4fd fix(ports): never hop to default when stored port busy; prefer stored port and let bind micro-retry handle release to avoid port swapping on recompiles 2025-08-08 08:37:02 -07:00
David Sarno 1b892dcf49 fix(ports): write both hashed and legacy port files; compare project paths case-insensitively to prevent sticky-port drift across reloads 2025-08-08 08:32:20 -07:00
David Sarno 85202d4ccb fix(editor): only treat dev mode when manifest uses file: path for package; remove dev-mode logs under UPM 2025-08-08 08:24:50 -07:00
David Sarno 57592017ae fix(bridge): prefer persisted project port at start to avoid initial 6400 blip after UPM import 2025-08-08 08:18:33 -07:00
David Sarno a65f10383a feat(bridge): embed Python server into package and remove Git-based installer
- Switch ServerInstaller to embedded copy-only (no network)
- Simplify Editor UI server status to 'Installed (Embedded)'
- Vendor UnityMcpServer/src into UnityMcpBridge/UnityMcpServer/src for UPM distribution
- Keep bridge recompile robustness (heartbeat + sticky port)
2025-08-08 08:08:30 -07:00
David Sarno a0fd9199bb Add meta for PackageInstaller so Unity includes it in package cache 2025-08-07 19:09:52 -07:00
David Sarno 673bc1bd49 Add PackageInstaller for automatic Python server installation on first package load 2025-08-07 19:06:12 -07:00
David Sarno 5c4ea29fc7 Editor Window: streamline layout, remove redundant badges; move and rename auto-run toggle to client section ("Auto-connect to MCP Clients"); rename button to "Run Client Setup"; fix dev-mode status by using FindPackagePythonDirectory() for Claude/Desktop path checks 2025-08-07 17:43:33 -07:00
David Sarno 32274a3965 UnityMCP stability: robust auto-restart on compile/play transitions; stop on domain reload; start/stop locking; per-project sticky ports + brief release wait; Python discovery scans hashed+legacy files and probes; editor window live status refresh. 2025-08-07 15:53:53 -07:00
Marcus Sanatan 2b69eb1595 Merge branch 'master' into fix-on-focus-config-check 2025-08-01 23:12:03 -04:00
Marcus Sanatan 80b7d811b0 fix: only check MCP configuration for selected client on window focus 2025-08-01 23:11:04 -04:00
Marcus Sanatan 1a7e92f62b
Add safeguard for null refs
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-08-01 08:20:52 -04:00
Marcus Sanatan 03ed78caef feat: add Windsurf IDE support with configuration paths and UI instructions 2025-08-01 08:12:07 -04:00
dsarno 94bbc9873c Improve Windows compatibility and code cleanup
- Enhanced Windows support for UV and Claude executable detection with OS-specific path handling
- Added PowerShell integration for Windows command execution with proper PATH environment setup
- Implemented comprehensive UV path scanning for various installation methods (Python, Chocolatey, Scoop, Cargo, etc.)
- Added executable validation using IsValidUvInstallation() method
- Improved Claude path detection with fallback to PowerShell's Get-Command
- Enhanced configuration path handling with Windows-specific paths and cross-platform normalization
- Cleaned up exception handling by removing unused exception variables
- Fixed method signature in VSCodeManualSetupWindow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:01:17 -07:00
Scriptwonder 32e4b2642f Unity-MCP AutoConnect
Autoconnect feature to prevent the port being taken by other applications.
2025-07-29 00:17:36 -04:00
Scriptwonder 92ad2c5031 Minor Changes
Add successfully registration info and reorder the seleciton
2025-07-28 18:30:33 -04:00
Scriptwonder 7dbb03b84e Update UnityMcpEditorWindow.cs
Prevention for CLI to be found on Windows.
2025-07-28 18:11:23 -04:00
David Sarno 2749b4e0c0 feat: Add comprehensive UV error handling and installation guidance
- Enhanced FindUvPath() to return null when UV is not found
- Added detailed installation instructions for all platforms
- Implemented null checks in all UV usage points
- Added cross-platform path resolution for Windows, macOS, and Linux
- Improved user experience with clear error messages instead of silent failures
- Prevents 'spawn uv ENOENT' errors by using full paths and proper validation
2025-07-28 11:55:08 -07:00
David Sarno cb59b08b51 Add Claude Code support with register/unregister toggle
- Added Claude Code as new MCP client type
- One-click registration via 'claude mcp add' command
- Toggle button to unregister when already configured
- Cross-platform support (Windows/macOS/Linux)
- Auto-detects configuration in ~/.claude.json
2025-07-28 10:45:07 -07:00
Shutong Wu 99faaf9684
Merge branch 'master' into master 2025-07-25 14:46:25 +08:00
Scriptwonder a2ae3d51ef Update ManageGameObject.cs
Minor fix
2025-07-25 02:44:00 -04:00
Shutong Wu 757edbc5a4
Merge pull request #93 from dsarno/feature/generalize-getcomponentdata
Feature: 🔍 Enhanced Component Data Reading via Serialization
2025-07-25 14:38:30 +08:00
Scriptwonder 46d7271e3d Update ManageGameObject.cs
Update with added comments
2025-07-25 02:32:19 -04:00
Scriptwonder 37db670427 Fix missing closing brace in SetComponentPropertiesInternal method 2025-07-25 02:27:20 -04:00
Scriptwonder 68efdf1bfe Clean up comment formatting in GameObjectSerializer 2025-07-25 02:26:24 -04:00
Scriptwonder 9101105212 Code Validation Update
1. Update the code validation feature. With Roslyn installed(see guide), MCP clients will receive detailed error messages and making the code generation process more error-proof
2. Minor update to the EditorWindow, making more space for upcoming features
3. Readme update to include Code validation guides
4. Minor bug fixes including installation bugs from previous VSC PR
2025-07-23 23:31:47 -04:00
Shutong Wu 6a47945479
Merge pull request #106 from Tanichael/feature/manage-shader
Feat: Add CRUD operations for Shader files via MCP

Example Prompt: "generate a cool shader and apply it on a new cube"
2025-07-14 01:45:29 -04:00
Scriptwonder 55f7c55389 Update for ManageShader
Bug fix and error handling check for the PR. Great work and I love what I built!
2025-07-14 01:42:16 -04:00
Scriptwonder e5793a6347 Update on Readme and TODO 2025-07-13 16:06:32 -04:00
Shutong Wu fb8be3b1c5
Update ManageAsset.cs 2025-07-13 15:14:08 -04:00
Shutong Wu 8211d85563
Merge pull request #126 from xsodus/feature/vscode-ghcs-support
Feature: VSCode GitHub Copilot Support
2025-07-13 15:10:36 -04:00
Shutong Wu 558b051323
Merge pull request #131 from Sunjnn/master
Add support for creating physics material assets. Works on Unity 2022 onwards and Unity 6, since they use different naming for PhysicsMaterial(PhysicMaterial before Unity 6, and PhysicsMaterial after). 
Add naming examples on the server side

TODO: currently unity-mcp only support adding gameobject and specifying adding a physic material, and manage_gameobject.cs does not handle a detailed request such as the copied request well. Will be the future work.

Example:
{
  `name`: `BouncyCube`,
  `action`: `create`,
  `position`: [
    6,
    2,
    0
  ],
  `primitive_type`: `Cube`,
  `components_to_add`: [
    `Rigidbody`
  ],
  `component_properties`: {
    `Rigidbody`: {
      `mass`: 1,
      `useGravity`: true
    },
    `BoxCollider`: {
      `material`: `Assets/Physics Materials/SuperBouncePhysicsMaterial.physicmaterial`
    }
  }
}
2025-07-13 14:45:13 -04:00
Scriptwonder 21fbac60c2 Update for PhysicsMaterial
1. Fixing to ensure both version of PhysicMaterial works, editing PhysicsMaterial properties to camelCase
2. Add example output on server
2025-07-13 14:33:06 -04:00
Scriptwonder 7b3b562c72 Update ManageAsset.cs
Silly mistake I made with a rush to fix the previous bug, will be more cautious and run through the test in the future.
2025-07-08 02:37:08 -04:00
Shutong Wu 1e8862aa4b Update ManageAsset.cs 2025-07-07 15:43:34 -04:00
Scriptwonder 85c947a34e Minor Bug Fix
1. Solve the IDE/Unity miscommunication for the _Color and menuPath params
2. TODOs: Fix readme, look into more issues, bring back tool dev tutorial, view pull request and set a future roadmap
2025-07-06 19:51:12 -04:00
亭鹤 77ed43bac5 docs: add summary for ApplyPhysicsMaterialProperties method 2025-05-22 19:48:16 +08:00