mcp_serverspeaks resources, with templates,resources/readand subscriptions, and prompts. After each message, subscribed resources are read again, andnotifications/resources/updatedgoes out for the ones whose contents changed.- Resources:
- the scene hierarchy (edit or live);
- the console;
- the latest compile's errors;
- the project settings as applied (build scenes, layers, axes, gravity, timestep);
- the review state;
- the Scripting API: an index plus one page per type, generated from UnityEngine.CoreModule by reflection, so it always matches the build;
- a compatibility matrix. There's no selection resource yet, because the editor has no selection.
- Prompts:
playtest,fix_errorsandport_check. execruns C# snippets through Roslyn's script compilation, not the scripting package: the factory entry point is called directly. Snippets compile against UnityEngine and the current script assemblies, load into a collectible context, and the result is described as JSON. The default usings leave outSystem, soObjectandRandommean Unity's.- The person controls
execin the review panel: never, ask each time (the default), or always. Snippets waiting for approval show with their code, Run and Reject, and their results. The agent gets a request id and fetches the result later. The setting survives launcher swaps. The launcher also replays resource subscriptions to a new build and tells the client that resources and prompts may have changed. - New CoreModule API:
Object.FindObjectsByType,FindFirstObjectByType,FindAnyObjectByType,FindObjectOfTypeandFindObjectsOfType. A newfind_objectsconformance scenario records Unity's rules:- InstanceID order (the newest runtime object first);
- inactive objects are left out unless asked for, and disabled components are included;
- runtime ScriptableObjects count, assets don't;
- an object destroyed with
Destroyis still found that frame. 26 scenarios pass.
- Next:
.csprojgeneration for IDEs, precompiled plugin DLLs, JsonUtility.
Phase 4 · Slice 9 ·