* feat: add JSON property handling for materials; add tests for JSON coercion and end-to-end; update test project manifest and ProjectVersion
* fix(manage_asset): support structured texture blocks case-insensitively; resolve _BaseMap/_MainTex automatically and apply when missing name
* Update MCPForUnity/Editor/Tools/ManageAsset.cs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* refactor(manage_asset): remove goto; reuse alias resolver for structured texture (supports 'albedo'); tests: self-sufficient texture asset and _BaseColor/_Color guards; python: assert success in invalid JSON case
* chore(manage_asset): remove duplicate return in modify case
* tests: fix mocks/patching for manage_asset/manage_gameobject; make invalid-json case tolerant; ensure prefab modify test patches transport correctly
* ci: allow manual dispatch for Unity EditMode tests (workflow_dispatch)
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Add TDD tests for MCP material management issues
- MCPMaterialTests.cs: Tests for material creation, assignment, and data reading
- MCPParameterHandlingTests.cs: Tests for JSON parameter parsing issues
- SphereMaterialWorkflowTests.cs: Tests for complete sphere material workflow
These tests document the current issues with:
- JSON parameter parsing in manage_asset and manage_gameobject tools
- Material creation with properties
- Material assignment to GameObjects
- Material component data reading
All tests currently fail (Red phase of TDD) and serve as specifications
for what needs to be fixed in the MCP system.
* Refine TDD tests to focus on actual MCP tool parameter parsing issues
- Removed redundant tests that verify working functionality (GameObjectSerializer, Unity APIs)
- Kept focused tests that document the real issue: MCP tool parameter validation
- Tests now clearly identify the root cause: JSON string parsing in MCP tools
- Tests specify exactly what needs to be fixed: parameter type flexibility
The issue is NOT in Unity APIs or serialization (which work fine),
but in MCP tool parameter validation being too strict.
* Fix port discovery protocol mismatch
- Update _try_probe_unity_mcp to recognize Unity bridge welcome message
- Unity bridge sends 'WELCOME UNITY-MCP' instead of JSON pong response
- Maintains backward compatibility with JSON pong format
- Fixes MCP server connection to Unity Editor
* Resolve merge: unify manage_gameobject param coercion and schema widening
* Tests: add MaterialParameterToolTests; merge port probe fix; widen tool schemas for JSON-string params
* feat(material): support direct shader property keys and texture paths; add EditMode tests
* chore(tests): track required .meta files; remove ephemeral Assets/Editor test helper
* fix(manage_gameobject): validate parsed component_properties is a dict; return clear error
* Add TDD tests for MCP material management issues
- MCPMaterialTests.cs: Tests for material creation, assignment, and data reading
- MCPParameterHandlingTests.cs: Tests for JSON parameter parsing issues
- SphereMaterialWorkflowTests.cs: Tests for complete sphere material workflow
These tests document the current issues with:
- JSON parameter parsing in manage_asset and manage_gameobject tools
- Material creation with properties
- Material assignment to GameObjects
- Material component data reading
All tests currently fail (Red phase of TDD) and serve as specifications
for what needs to be fixed in the MCP system.
* Refine TDD tests to focus on actual MCP tool parameter parsing issues
- Removed redundant tests that verify working functionality (GameObjectSerializer, Unity APIs)
- Kept focused tests that document the real issue: MCP tool parameter validation
- Tests now clearly identify the root cause: JSON string parsing in MCP tools
- Tests specify exactly what needs to be fixed: parameter type flexibility
The issue is NOT in Unity APIs or serialization (which work fine),
but in MCP tool parameter validation being too strict.
* Fix port discovery protocol mismatch
- Update _try_probe_unity_mcp to recognize Unity bridge welcome message
- Unity bridge sends 'WELCOME UNITY-MCP' instead of JSON pong response
- Maintains backward compatibility with JSON pong format
- Fixes MCP server connection to Unity Editor
* Resolve merge: unify manage_gameobject param coercion and schema widening
* Tests: add MaterialParameterToolTests; merge port probe fix; widen tool schemas for JSON-string params
* refactor: extract JSON coercion helper; docs + exception narrowing\nfix: fail fast on bad component_properties JSON\ntest: unify setup, avoid test-to-test calls\nchore: use relative MCP package path
* chore(tests): track MCPToolParameterTests.cs.meta to keep GUID stable
* test: decouple MaterialParameterToolTests with helpers (no inter-test calls)