Skip to content

Commit 93e36c9

Browse files
Sebastian Muehrclaude
andcommitted
feat: add manage_asset_store tool for Asset Store package operations
Add a new MCP tool that enables AI assistants to list, download, and import Unity Asset Store packages programmatically. ## Actions - **check_auth**: Verify Unity account login status - **list_purchases**: List all purchased Asset Store packages with demand-driven pagination via MyAssetsPage.LoadMore - **download**: Download a package by product ID (awaits completion) - **import**: Import a downloaded .unitypackage into the project ## Architecture Uses reflection into Unity's internal Package Manager APIs (UnityEditor.PackageManager.UI.Internal.*), following the same pattern as the existing FrameDebuggerOps profiler tool. A hidden (never-shown) PackageManagerWindow instance provides access to all internal services without any visible UI side effects. Key internal types accessed: - AssetStoreDownloadManager (download via IEnumerable<long> overload) - AssetStoreCache/AssetStoreLocalInfo (package path lookup) - AssetStoreListOperation (pagination progress tracking) - PackageDatabase (package metadata) - PaginatedVisualStateList (accurate purchase count/pagination) ## Implementation Details - Async handlers using TaskCompletionSource + EditorApplication.update (same pattern as RefreshUnity.cs) - Lazy type/method resolution cached across calls, cleared on domain reload - Graceful degradation: returns clear error messages if internal APIs are unavailable or changed in a different Unity version - Download completion verified after await — returns ErrorResponse on failure or timeout - Tested on Unity 6000.4.0f1 (Linux) ## Files - MCPForUnity/Editor/Tools/ManageAssetStore.cs (C# handler) - Server/src/services/tools/manage_asset_store.py (Python MCP tool) - Server/src/cli/commands/asset_store.py (CLI commands) - Server/src/cli/main.py (CLI registration, +1 line) - Server/tests/test_manage_asset_store.py (14 tests) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent eb07941 commit 93e36c9

6 files changed

Lines changed: 1470 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)