unity-mcp/TestProjects/UnityMCPTests/Assets
dsarno 62c015d873
Add create_child parameter to manage_prefabs modify_contents (#646)
* Add create_child parameter to manage_prefabs modify_contents

Enables adding child GameObjects to existing prefabs via headless editing.
Supports single object or array for batch creation in one save operation.

Features:
- Create children with primitive types (Cube, Sphere, etc.)
- Set position, rotation, scale on new children
- Add components to children
- Specify parent within prefab hierarchy for nested children
- Set tag, layer, and active state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Address code review feedback for create_child validation

- Fix type hint to `tuple[dict | None, str | None]` to match actual returns
- Add explicit dict validation with clear error message including actual type
- Error on invalid component entries instead of silently ignoring them
- Return ErrorResponse for invalid tag/layer instead of just logging warnings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add unit tests for create_child prefab functionality

Tests cover:
- Single child with primitive type
- Empty GameObject (no primitive_type)
- Multiple children from array (batch creation)
- Nested parenting within prefab
- Error handling for invalid inputs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 04:14:52 -08:00
..
Scenes Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00
Scripts Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00
Tests Add create_child parameter to manage_prefabs modify_contents (#646) 2026-01-29 04:14:52 -08:00
UI Toolkit Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00
Packages.meta feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
Scenes.meta Set up Unit tests (#220) 2025-08-15 21:24:55 -04:00
Scripts.meta Set up Unit tests (#220) 2025-08-15 21:24:55 -04:00
Temp.meta 🔧 Clean up & Consolidate Shared Services Across MCP Tools (#519) 2026-01-06 12:58:17 -08:00
TestMat.mat Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00
TestMat.mat.meta Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00
Tests.meta Set up Unit tests (#220) 2025-08-15 21:24:55 -04:00
UI Toolkit.meta Large Cleanup and Refactor + Many new Tests added (#642) 2026-01-29 02:47:36 -08:00