Commit Graph

50 Commits (6e59b8fe8dc343c99f38ee9d3cb6f0593bf8bc1f)

Author SHA1 Message Date
David Sarno 6e59b8fe8d fix: linux XDG config paths; prefer installed server; robust cursor detection; atomic writes; uv validation; WinGet Links ordering 2025-08-13 18:13:25 -07:00
David Sarno 4e1b905ea0 chore: bump version to 2.1.0; Windows uv resolver improvements; preserve existing uv command; Claude unregister UI fix; .ps1 handling; add generic mcp_source.py 2025-08-13 14:02:19 -07:00
dsarno b6b8d47dfe Windows: robust Claude CLI resolution (prefer .cmd, fallback .ps1, where.exe); Unregister UX: use 'claude mcp get' exit codes; stop PATH prepend on Windows; safer detection when unregistered 2025-08-13 12:36:24 -07:00
David Sarno 9a9267c128 Windows: prefer WinGet Links uv.exe and preserve existing absolute uv command during config writes 2025-08-13 11:35:31 -07:00
David Sarno a52ce7a219 VSCode manual config: use resolved uv path; VSCode parse init guards; NVM version parse robustness; help labels [HELP] 2025-08-12 21:33:43 -07:00
David Sarno 5965158533 Unity MCP: Claude Code UX improvements: dynamic not-found state with inline help link; NVM auto-detection; path picker override; hide picker after detection; remove auto-connect toggle. 2025-08-12 19:04:47 -07:00
David Sarno efd146ab53 fix: Windows define UNITY_EDITOR_WIN; async stdout/stderr in TryRun and RepairPythonEnvironment; use EnvironmentVariables for PATH; prepend Unix PATH only on macOS/Linux; fix duplicate .meta GUIDs 2025-08-12 11:56:46 -07:00
David Sarno f6f8b24371 chore(uv): prepend ~/.local/bin and common bins to PATH for 'which uv' in GUI env 2025-08-12 10:48:46 -07:00
David Sarno 6b3a20dd78 chore(package): add .meta files for new helpers and bump version to 2.0.1 2025-08-12 10:34:34 -07:00
David Sarno 8984ab95bc feat: local-only package resolution + Claude CLI resolver; quieter install logs; guarded auto-registration 2025-08-12 08:32:51 -07:00
dsarno b179ce1ed8
Merge branch 'main' into feat/bridge-stability 2025-08-10 11:57:07 -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
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 5d148a7462 chore: update repository URLs and package name to use correct CoplayDev casing and main branch 2025-08-08 15:06:35 -04: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 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 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
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 68efdf1bfe Clean up comment formatting in GameObjectSerializer 2025-07-25 02:26:24 -04:00
David Sarno 3063d54071 fix: Improved component data retrieval with special handling for Transform and Camera components to prevent serialization crashes 2025-04-10 13:10:10 -07:00
David Sarno 51eb59f04f Fix(MCP): Resolve ValidTRS crash during component serialization
The Unity Editor was crashing with ValidTRS() assertions when attempting to get components from certain GameObjects like the Main Camera.

Investigation revealed the crash occurred during JSON serialization when reflection code accessed specific matrix properties (e.g., Camera.cullingMatrix, Transform.rotation, Transform.lossyScale). Accessing these properties appears to trigger internal Transform state validation failures, potentially due to interactions with the JSON serializer's reflection mechanism.

This fix addresses the issue by:

- Replacing LINQ iteration in GetComponentsFromTarget with a standard loop over a copied list to prevent potential premature serialization interactions.

- Explicitly skipping known problematic Camera matrix properties (cullingMatrix, pixelRect, rect) and generic matrix properties (worldToLocalMatrix, localToWorldMatrix) within GetComponentData's reflection logic.

- Retaining manual serialization for Transform component properties to avoid related reflection issues.
2025-04-10 12:53:01 -07:00
David Sarno 0433b88f68 Fix: Add missing .meta file for GameObjectSerializer 2025-04-10 09:45:56 -07:00
David Sarno dd0113d258 Refactor: Extract GameObject/Component serialization to GameObjectSerializer helper
Moved serialization logic (GetGameObjectData, GetComponentData, metadata caching, JSON conversion helpers) from ManageGameObject tool to a dedicated GameObjectSerializer class in the Helpers namespace.

This improves separation of concerns and reduces the size/complexity of ManageGameObject.cs. Updated ManageGameObject to use the new helper class.
2025-04-10 09:42:42 -07:00
Justin Barnett b2f65f2ffc added public helper methods for project versions 2025-04-09 07:42:43 -04:00
Justin Barnett 99f38e21bd PR prep 2025-04-08 20:55:22 -04:00
Justin Barnett 8c50e01add update update path 2025-04-08 15:23:46 -04:00
Justin Barnett a3f1926338 pass content, not path 2025-04-08 15:19:52 -04:00
Justin Barnett 2f260861df update pyproject.toml path 2025-04-08 15:17:26 -04:00
Justin Barnett 64b771210b update version analysis 2025-04-08 15:13:41 -04:00
Justin Barnett f446b502ee removed logging 2025-04-08 15:02:59 -04:00
Justin Barnett e9bc45c0df updated PyprojectUrl 2025-04-08 14:20:54 -04:00
Justin Barnett d5917bdbec added loging, updated paths 2025-04-08 14:12:30 -04:00
Justin Barnett 3199421586 removed python and uv check during install 2025-04-08 14:03:56 -04:00
Justin Barnett 7b303b5ba3 update pyproject.toml get location 2025-04-08 11:44:12 -04:00
Justin Barnett e4ccf614c5 update server save location, again 2025-04-08 11:41:14 -04:00
Justin Barnett 0aa191c7e3 update pyproject name and save location again 2025-04-08 11:10:01 -04:00
Justin Barnett b8c8910323 update install location 2025-04-08 10:56:05 -04:00
Justin Barnett b36c4576d9 only install UnityMcpServer folder, not whole repo 2025-04-08 10:48:39 -04:00
Justin Barnett 33b6486b70 backslashes for windows 2025-04-08 10:39:14 -04:00
Justin Barnett 2f6d748607 updated server install process 2025-04-08 10:33:14 -04:00
Justin Barnett 99ceb49ac3 update server install process 2025-04-08 09:46:34 -04:00
Justin Barnett 7beaab1fcb updated GitUrl to include branch name 2025-04-08 08:59:26 -04:00
Justin Barnett 8a89f55daf update installer to account for different os 2025-04-08 07:52:44 -04:00
Justin Barnett 61a7cb9e28 added remote install of python server 2025-04-08 07:22:24 -04:00
Justin Barnett cb603b7b1a restructured project
- moved Unity package and Python application into separate folders to be
downloaded separately using clone .git/UnityMcpBridge
2025-04-08 06:14:13 -04:00