unity-mcp/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools
dsarno aaf6308b33
fix: Add special handling for UIDocument serialization to prevent infinite loops (#586)
* fix: search inactive objects when setActive=true in modify

When trying to activate an inactive GameObject via manage_gameobject modify with setActive=true, the lookup would fail because inactive objects were not included in the search by default.

Now automatically sets searchInactive=true when setActive=true is specified, allowing inactive objects to be found and activated.

* fix: Add special handling for UIDocument serialization to prevent infinite loops (#585)

UIDocument.rootVisualElement contains circular parent/child references that
can cause infinite serialization loops. This adds special handling similar to
Transform and Camera components.

The fix:
- Safely serializes panelSettings, visualTreeAsset, sortingOrder, enabled, parentUI
- Explicitly skips rootVisualElement to prevent circular reference issues
- Includes a note explaining why rootVisualElement is skipped

Tested on Unity 2021.3 and Unity 6.3.

* refactor: Extract SerializeAssetReference helper and align UIDocument structure

- Add SerializeAssetReference() helper for consistent asset reference serialization
- UIDocument now uses same return structure as Camera (typeName, instanceID, properties)
- Reduces code duplication in special-case handlers
- Enhanced test coverage to verify structure matches Camera pattern

* fix: Handle UIDocument subclasses and add negative assertion for rootVisualElement

Address code review feedback:
- Add IsOrDerivedFrom() helper to detect UIDocument and any subclasses by walking
  the base-type chain, ensuring derived types also get special-case handling
- Add negative assertion verifying rootVisualElement is NOT in serialized output
2026-01-19 08:21:36 -08:00
..
Fixtures Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
AIPropertyMatchingTests.cs 🔧 Clean up & Consolidate Shared Services Across MCP Tools (#519) 2026-01-06 12:58:17 -08:00
AIPropertyMatchingTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
CommandRegistryTests.cs Clean up Unity and Python tests (#548) 2026-01-11 20:26:20 -08:00
CommandRegistryTests.cs.meta Improve Windsurf MCP Config (#231) 2025-08-24 06:57:11 -04:00
ComponentResolverTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
ComponentResolverTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
DomainReloadResilienceTests.cs Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
DomainReloadResilienceTests.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ExecuteMenuItemTests.cs Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
ExecuteMenuItemTests.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
Fixtures.meta feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
GameObjectAPIStressTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
GameObjectAPIStressTests.cs.meta 🎮 GameObject Toolset Redesign and Streamlining (#518) 2026-01-06 10:13:45 -08:00
MCPToolParameterTests.cs Clean up Unity and Python tests (#548) 2026-01-11 20:26:20 -08:00
MCPToolParameterTests.cs.meta Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00
ManageGameObjectCreateTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
ManageGameObjectCreateTests.cs.meta 🎮 GameObject Toolset Redesign and Streamlining (#518) 2026-01-06 10:13:45 -08:00
ManageGameObjectDeleteTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
ManageGameObjectDeleteTests.cs.meta 🎮 GameObject Toolset Redesign and Streamlining (#518) 2026-01-06 10:13:45 -08:00
ManageGameObjectModifyTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
ManageGameObjectModifyTests.cs.meta 🎮 GameObject Toolset Redesign and Streamlining (#518) 2026-01-06 10:13:45 -08:00
ManageGameObjectTests.cs Clean up Unity and Python tests (#548) 2026-01-11 20:26:20 -08:00
ManageGameObjectTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
ManageMaterialPropertiesTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageMaterialPropertiesTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialReproTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageMaterialReproTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialStressTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageMaterialStressTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageMaterialTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManagePrefabsTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManagePrefabsTests.cs.meta Open and close prefabs in the stage view + create them (#283) 2025-09-26 19:28:56 -04:00
ManageSceneHierarchyPagingTests.cs Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
ManageSceneHierarchyPagingTests.cs.meta Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
ManageScriptValidationTests.cs Autoformat (#297) 2025-09-30 16:25:33 -04:00
ManageScriptValidationTests.cs.meta fix: address CodeRabbit and Greptile feedback 2025-09-03 16:37:45 -07:00
ManageScriptableObjectStressTests.cs Clean up Unity and Python tests (#548) 2026-01-11 20:26:20 -08:00
ManageScriptableObjectStressTests.cs.meta Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageScriptableObjectTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ManageScriptableObjectTests.cs.meta feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
MaterialDirectPropertiesTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
MaterialDirectPropertiesTests.cs.meta Material tools: support direct shader property keys + add EditMode coverage (#344) 2025-10-23 18:25:29 -07:00
MaterialMeshInstantiationTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
MaterialMeshInstantiationTests.cs.meta test: Consolidate pytest suite to MCPForUnity and improve test infrastructure (#332) 2025-10-21 10:42:55 -07:00
MaterialParameterToolTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
MaterialParameterToolTests.cs.meta Harden MCP tool parameter handling + add material workflow tests (TDD) (#343) 2025-10-23 17:57:27 -07:00
ReadConsoleTests.cs Harden `manage_scriptable_object` Tool (#522) 2026-01-07 10:46:35 -04:00
ReadConsoleTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
RunTestsTests.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
RunTestsTests.cs.meta Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00
UIDocumentSerializationTests.cs fix: Add special handling for UIDocument serialization to prevent infinite loops (#586) 2026-01-19 08:21:36 -08:00