Commit Graph

7 Commits (e4904ad0d7ef37d68c30e447d6174e0203681489)

Author SHA1 Message Date
Marcus Sanatan f6796e61f7
Autoformat (#297) 2025-09-30 16:25:33 -04:00
Marcus Sanatan ae13ef41d5
Rename namespace and public facing plugin output from "Unity MCP" to "MCP for Unity" (#225)
* refactor: rename namespace from UnityMcpBridge to MCPForUnity across all files

See thread in #6, we can't use Unity MCP because it violates their trademark.
That name makes us look affiliated. We can use MCP for Unity

* Change package display name, menu item and menu titles

These are front facing so has to change for Unity asset store review

* Misc name changes in logs and comments for better consistency

* chore: update editor window title from 'MCP Editor' to 'MCP for Unity'

* refactor: update branding from UNITY-MCP to MCP-FOR-UNITY across all log messages and warnings

* chore: rename Unity MCP to MCP For Unity across all files and bump version to 2.1.2

* docs: update restore script title to clarify Unity MCP naming

* Fix usage instructions

* chore: update log messages to use MCP For Unity branding instead of UnityMCP

* Add a README inside plugin, required for distributing via the asset store

* docs: update Unity port description and fix typo in troubleshooting section

* Address Rabbit feedback

* Update Editor prefs to use new name

Prevents overlap with other Unity MCPs, happy to revert if it's too much

* refactor: rename server logger and identifier from unity-mcp-server to mcp-for-unity-server

* Standardize casing of renamed project to "MCP for Unity", as it is on the asset store

* Remove unused folder

* refactor: rename Unity MCP to MCP for Unity across codebase

* Update dangling references

* docs: update product name from UnityMCP to MCP for Unity in README

* Update log and comments for new name
2025-08-20 15:59:49 -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 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 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