Repository navigation
feat: add optional Addressables management and content builds - #1486
shaobin1991 wants to merge 1 commit into
Conversation
Expose configuration queries, group/entry/label/profile mutations, supported settings updates, and native content build/update/clean jobs through MCP and CLI. Keep Addressables optional and add two bounded read-only resources. Support older public content-state path APIs and validate successful builds return an existing state file. Isolate native import callbacks and restore fixture assets, build-session state and queued callbacks after tests. Add Python and Editor regression coverage, local multi-version validation, and generated documentation. Use existing Unity test discovery without adding optional-package CI jobs. Register Undo callbacks at Editor domain load and cover Undo before first tool use after reload. Clarify active-profile CLI defaults and resource prerequisites.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Description
Add
manage_addressablesso MCP clients can inspect Addressables configuration, manage asset registrations and run native content builds without writing custom Editor scripts. Include matching CLI commands and read-only settings/groups resources.This implements the 22 actions in the Addressables roadmap, plus
entry_listfor paginated entry inspection andbuild_statusfor polling content operations.Type of Change
Changes Made
com.unity.addressablesoptional through API reflection.pingreports package, API and settings availability. Queries do not create settings; creation requiresset_settingswithinitialize: true.Compatibility / Package Source
file:reference to this branch'sMCPForUnity; Git package-lock revision is not applicable.CoplayDev/unity-mcp:betaated4e205d31a545bac3686d5e19210e67959aeddd.Addressables test results (ordinary and domain-reload runs are separate):
All rows had zero failures. The skipped case in installed-package environments checks package absence; the 67 skips in no-package environments require Addressables.
Earlier package checks also passed 69 ordinary tests with 1 skipped for 1.21.21 on Unity 2022 and 2.2.2 / 3.0.0 on Unity 6. These preceded the final Undo initialization change and did not include its new domain-reload regression.
Testing/Screenshots/Recordings
cd Server && .venv/Scripts/python.exe -m pytest tests/ -q --ignore=tests/integration: 1369 passed, 3 skipped. The live integration directory was excluded.Server/.venv/Scripts/python.exe tools/generate_docs_reference.py --check.Real MCP calls exercised all 24 actions on the Unity 2022 / 1.22.3 and Unity 6 / 2.10.3 environments, including native full-build/update/clean operations. Separate checks verified that test fixtures restore host configuration and assets on success and failure.
tools/check-unity-versions.ps1on an isolated official-project copy: 1 passed (2021.3.45f2), 0 failed, 3 skipped because the other exact configured Editors are not installed. The complete matrix and online CI remain unverified.Complete upstream EditMode suite on 2021.3.45f2, without Addressables: 1483 passed, 1 failed, 153 skipped; the separate domain-reload group passed 7/7. The sole failure,
ExecPathBatchShimTests.FindAllInPath_ReturnsEveryMatchInPathOrder, compares a Windows 8.3 temporary-directory path with its resolved long path. It reproduces on untouched upstreamed4e205dand is also reported in #1477.Documentation Updates
Related Issues
Implements the Addressables roadmap item linked above; no associated issue.
Additional Notes
Native builds run synchronously on the Editor main thread and cannot be cancelled; client timeouts do not cancel them. Failed builds may leave outputs. Only the latest content job is retained per Editor session. Group creation/removal explicitly report that Undo is unsupported.
The Unity CI workflow is unchanged; it does not install Addressables specifically for these tests, so package-dependent cases skip when the package is absent. Tuanjie and versions not listed above were not tested.
I use this project regularly and would be happy to follow up on Addressables-related bug reports and compatibility issues.
Summary by CodeRabbit