unity-mcp icon indicating copy to clipboard operation
unity-mcp copied to clipboard

Read all scripts in a scene at once

Open Scriptwonder opened this issue 10 months ago • 3 comments

I can see the new Resources API can read files via URIs, but I was wondering if the community wants a convenient tool that can read all scripts in a scene at once. I can get to that after I finish the custom tool I am building.

Scriptwonder avatar Jan 09 '26 23:01 Scriptwonder

@Scriptwonder This seems like it might be a huge response size for any scene with a lot of scripts. And I think the component / gameobject resources can figure this out fairly quickly if needed -- they can see which scripts are on objects in the scene, in a targeted way. Do you think we need more?

dsarno avatar Jan 28 '26 22:01 dsarno

I got an idea.

Why don’t we create a search tool for the currently selected scene that scans for GameObjects and attached scripts directly inside Unity?

This would shift the workload to the client side instead of putting the pressure on the agent. Scene data can be large and complex, and processing it locally through the Unity Editor API would be faster, more scalable, and reduce unnecessary computation and communication overhead on the agent side. It would also provide more immediate and precise results tailored to the developer’s current context.@dsarno

In case we need this feature.

whatevertogo avatar Feb 12 '26 22:02 whatevertogo

This has been transferred to a discussion: https://github.com/CoplayDev/unity-mcp/discussions/775

dsarno avatar Feb 18 '26 22:02 dsarno