generated from IvanMurzak/Unity-Package-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Reference
- Use the implementation in
TestRunner.Run.csas a reference. - Implement responses with
ResponseCallTooland return Processing status when appropriate.
Method Signature
The method should accept:
string[] packageIds— list of package IDs to removestring? requestId = nullwith attribute[RequestID]
Steps
- Iterate through
packageIds:- Search for each package dependency in
/Packages/manifest.json. - If a package is not found, add a response message:
(Duplicate this message for each missing package.)
[Warning] Package {packageId} not found - If found, mark it for removal and store the result:
- success → deleted
- warning → not found
- Search for each package dependency in
- After processing all package IDs:
- If at least one package was removed:
- Call:
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
- Return
ResponseCallToolwith Processing status. - Handle scenarios:
- No domain reload:
- After refresh completes, generate a response message from stored deletion results.
- Each package result must be on a new line.
- Domain reload triggered:
- Wait until completion.
- If compilation fails → return an error.
- If compilation succeeds → generate a response message from stored deletion results (each on a new line).
- No domain reload:
- Call:
- If at least one package was removed:
Final Step
- In both scenarios, notify the MCP server with the generated response string.
- The response must include the result for each package, with one package result per line.
- This ensures the server is released from waiting for the operation to complete.
Copilot
Metadata
Metadata
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
Todo