unity-mcp/TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef

28 lines
569 B
Plaintext
Raw Normal View History

{
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-21 03:59:49 +08:00
"name": "MCPForUnityTests.EditMode",
"rootNamespace": "",
"references": [
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-21 03:59:49 +08:00
"MCPForUnity.Editor",
Test/478 matrix4x4 serialization crash (#481) * Fix #478: Add Matrix4x4Converter to prevent Cinemachine serialization crash The `get_components` action crashes Unity when serializing Cinemachine camera components because Newtonsoft.Json accesses computed Matrix4x4 properties (lossyScale, rotation) that call ValidTRS() on non-TRS matrices. This fix adds a safe Matrix4x4Converter that only accesses raw matrix elements (m00-m33), avoiding the dangerous computed properties entirely. Changes: - Add Matrix4x4Converter to UnityTypeConverters.cs - Register converter in GameObjectSerializer serializer settings Tested with Cinemachine 3.1.5 on Unity 6 - get_components now returns full component data without crashing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add unit tests for Matrix4x4Converter Tests cover: - Identity matrix serialization/deserialization - Translation matrix round-trip - Degenerate matrix (determinant=0) - key regression test - Non-TRS matrix (projection) - validates ValidTRS() is never called - Null handling - Ensures dangerous properties are not in output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address code review feedback - Fix null handling consistency: return zero matrix instead of identity (consistent with missing field defaults of 0f) - Improve degenerate matrix test to verify: - JSON only contains raw mXY properties - Values roundtrip correctly - Rename test to reflect expanded coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Move tests to TestProject per review feedback Moved Matrix4x4ConverterTests from MCPForUnity/Editor/Tests/ to TestProjects/UnityMCPTests/Assets/Tests/EditMode/Helpers/ as requested. Also added MCPForUnity.Runtime reference to the test asmdef since the converter lives in the Runtime assembly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix Matrix4x4 deserialization guard + UI Toolkit USS warning --------- Co-authored-by: Alexander Mangel <cygnusfear@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:53:14 +08:00
"MCPForUnity.Runtime",
"TestAsmdef",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll",
"Newtonsoft.Json.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
Test/478 matrix4x4 serialization crash (#481) * Fix #478: Add Matrix4x4Converter to prevent Cinemachine serialization crash The `get_components` action crashes Unity when serializing Cinemachine camera components because Newtonsoft.Json accesses computed Matrix4x4 properties (lossyScale, rotation) that call ValidTRS() on non-TRS matrices. This fix adds a safe Matrix4x4Converter that only accesses raw matrix elements (m00-m33), avoiding the dangerous computed properties entirely. Changes: - Add Matrix4x4Converter to UnityTypeConverters.cs - Register converter in GameObjectSerializer serializer settings Tested with Cinemachine 3.1.5 on Unity 6 - get_components now returns full component data without crashing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add unit tests for Matrix4x4Converter Tests cover: - Identity matrix serialization/deserialization - Translation matrix round-trip - Degenerate matrix (determinant=0) - key regression test - Non-TRS matrix (projection) - validates ValidTRS() is never called - Null handling - Ensures dangerous properties are not in output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address code review feedback - Fix null handling consistency: return zero matrix instead of identity (consistent with missing field defaults of 0f) - Improve degenerate matrix test to verify: - JSON only contains raw mXY properties - Values roundtrip correctly - Rename test to reflect expanded coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Move tests to TestProject per review feedback Moved Matrix4x4ConverterTests from MCPForUnity/Editor/Tests/ to TestProjects/UnityMCPTests/Assets/Tests/EditMode/Helpers/ as requested. Also added MCPForUnity.Runtime reference to the test asmdef since the converter lives in the Runtime assembly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix Matrix4x4 deserialization guard + UI Toolkit USS warning --------- Co-authored-by: Alexander Mangel <cygnusfear@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:53:14 +08:00
}