* feat: Add prefab read operations (get_info, get_hierarchy, list_prefabs)
- Add get_info: retrieve prefab metadata (GUID, type, components, child count, variant info)
- Add get_hierarchy: get prefab internal structure with pagination support
- Add list_prefabs: search prefabs in project with optional name filtering
- Extract PrefabUtilityHelper class for reusable prefab utility methods
- Update Python tool descriptions and parameter documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Use correct API to save prefab stage changes
Replace PrefabUtility.SaveAsPrefabAsset (for creating new prefabs) with
EditorSceneManager.SaveScene to properly save stage modifications.
This fixes the issue where component additions were lost after closing
the prefab stage.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: improve code quality and error handling
- Add pagination constants (DefaultPageSize, MaxPageSize)
- Extract SaveAndRefreshStage helper to reduce duplication
- Change all user-facing messages to English
- Add REQUIRED_PARAMS validation in Python
- Split path parameter into prefab_path and folder_path for clarity
- Improve error handling with specific exception types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: Remove list_prefabs action and update related documentation
* feat: Enhance prefab management with detailed parameter descriptions and new unlinking option
* feat: Simplify prefab creation logic and unify logging for asset replacement
* feat: Update SaveStagePrefab method to use SetDirty and SaveAssets for prefab stage saving
* feat: Add PrefabUtilityHelper class with utility methods for prefab asset management
* feat: Refactor action constants and enhance parameter validation in prefab management
* feat: Update ValidateSourceObjectForPrefab method to remove replaceExisting parameter and simplify validation logic
* fix: Fix searchInactive parameter and improve prefab management
- Fix searchInactive not working correctly for child objects
- Improve error message accuracy for object not found
- Use Application.dataPath for reliable directory path resolution
* feat: Add path validation and security checks for prefab operations
* feat: Remove pagination from GetHierarchy method and simplify prefab retrieval
* feat: Remove mode parameter from prefab management functions to simplify usage
* fix: Improve path validation and replace logic in prefab management
* feat: Enhance prefab management by adding nesting depth and parent prefab path retrieval
* fix: resolve Unknown pseudo class last-child USS warnings
Unity UI Toolkit does not support the :last-child pseudo-class. Replace
it with a .section-last class that is applied programmatically to the
last section in each .section-stack container.
Also moves the Configure All Detected Clients button to the bottom
of the Client Configuration section and makes it auto-width.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: improve prefab stage save for automated workflows
- Add force parameter to save_open_stage for automated workflows
where isDirty may not be correctly set
- Use PrefabUtility.SaveAsPrefabAsset for dialog-free saving
- Mark prefab stage scene dirty when modifying GameObjects in prefab mode
- Skip save when no changes and force=false (prevents false dirty flag)
The force parameter ensures reliable saving in CI/automation scenarios
where Unity dirty tracking may be inconsistent with programmatic changes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update prefab.py
* refactor: remove unnecessary blank line before create function
* feat: add info and hierarchy commands to prefab CLI for enhanced prefab management
* feat: enhance prefab management with comprehensive CRUD tests and ensure dirty state tracking
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: David Sarno <david@lighthaus.us>
* Update for Texture2D/Sprite Generation
Given the choice to generate Texture2D based on patterns and color, also introduce pipeline to turn Texture2D direct to Sprite.
Update CLI command to include this too.
* Texture Size Set
Set texture size to 1024X1024 to avoid too large texture set
* Add image input
* Update to release direct error with large tex2d
* Fix for AI advice
* Update on action fetch line
* feat: Add CLI for Unity MCP server
- Add click-based CLI with 15+ command groups
- Commands: gameobject, component, scene, asset, script, editor, prefab, material, lighting, ui, audio, animation, code
- HTTP transport to communicate with Unity via MCP server
- Output formats: text, json, table
- Configuration via environment variables or CLI options
- Comprehensive usage guide and unit tests
* Update based on AI feedback
* Fixes main.py error
* Update for further error fix
* Update based on AI
* Update script.py
* Update with better coverage and Tool Readme
* Log a message with implicit URI changes
Small update for #542
* Minor fixes (#602)
* Log a message with implicit URI changes
Small update for #542
* Log a message with implicit URI changes
Small update for #542
* Add helper scripts to update forks
* fix: improve HTTP Local URL validation UX and styling specificity
- Rename CSS class from generic "error" to "http-local-url-error" for better specificity
- Rename "invalid-url" class to "http-local-invalid-url" for clarity
- Disable httpServerCommandField when URL is invalid or transport not HTTP Local
- Clear field value and tooltip when showing validation errors
- Ensure field is re-enabled when URL becomes valid
* Docker mcp gateway (#603)
* Log a message with implicit URI changes
Small update for #542
* Update docker container to default to stdio
Replaces #541
* fix: Rider config path and add MCP registry manifest (#604)
- Fix RiderConfigurator to use correct GitHub Copilot config path:
- Windows: %LOCALAPPDATA%\github-copilot\intellij\mcp.json
- macOS: ~/Library/Application Support/github-copilot/intellij/mcp.json
- Linux: ~/.config/github-copilot/intellij/mcp.json
- Add mcp.json for GitHub MCP Registry support:
- Enables users to install via coplaydev/unity-mcp
- Uses uvx with mcpforunityserver from PyPI
* Use click.echo instead of print statements
* Standardize whitespace
* Minor tweak in docs
* Use `wait` params
* Unrelated but project scoped tools should be off by default
* Update lock file
* Whitespace cleanup
* Update custom_tool_service.py to skip global registration for any tool name that already exists as a built‑in.
* Avoid silently falling back to the first Unity session when a specific unity_instance was requested but not found.
If a client passes a unity_instance that doesn’t match any session, this code will still route the command to the first available session, which can send commands to the wrong project in multi‑instance environments. Instead, when a unity_instance is provided but no matching session_id is found, return an error (e.g. 400/404 with "Unity instance '' not found") and only default to the first session when no unity_instance was specified.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update docs/CLI_USAGE.md
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Updated the CLI command registration to only swallow missing optional modules and to surface real import-time failures, so broken command modules don’t get silently ignored.
* Sorted __all__ alphabetically to satisfy RUF022 in __init__.py.
* Validate --params is a JSON object before merging.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Shutong Wu <51266340+Scriptwonder@users.noreply.github.com>
Co-authored-by: dsarno <david@lighthaus.us>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>