I was surprised to find that the MCP doesn’t currently allow changing serialized fields on prefab assets, and I’d like to ask whether adding this is planned or feasible. At least I'd like to understand is cursor's auto agent model couldn't find it so how can I set rules or prompts to fix that.
Use case
I needed to assign sprite references to new [SerializeField] slots on a MonoBehaviour that lives on a prefab (e.g. HiddenObjects.cs with fields like binocularsSprite, hatSprite, etc.). The goal was to wire up assets from Assets/_Game/Sprites/Objects/ to the prefab’s component without opening Unity’s Prefab editor by hand.
What my agent tried
manage_components with action: "set_property": It used the prefab asset path as target (e.g. _Game/Prefabs/Objects/ObjectHolder.prefab) and search_method: "by_path". The call failed with something like: “Target GameObject ('_Game/Prefabs/...') not found using method 'by_path'.” So it seems the tool only resolves GameObjects in the current scene, not prefab assets on disk.
manage_asset with action: "modify": I wasn’t able to see a way to pass component-level properties (e.g. sprite references) for a prefab, only higher-level asset metadata.
Current workaround
It edited the .prefab YAML by hand and added the new sprite references (e.g. binocularsSprite: {fileID: 21300000, guid: ..., type: 3}) using GUIDs from the sprite .meta files, then triggered a refresh. That works but is brittle and not ideal for automation.
My Agent's Suggestion
It would be very useful if the MCP could update serialized fields on prefab assets (not only on scene instances), for example by:
Extending manage_components so that target can be a prefab asset path (and optionally a path to a child GameObject inside the prefab), and so that set_property applies to that prefab’s serialized data, or
Adding a dedicated action (e.g. under manage_asset or manage_prefabs) like “set prefab component property” that takes an asset path, component type, property name, and value (e.g. object reference by GUID).
I’d be happy to add more detail or use cases if that would help.
I was surprised to find that the MCP doesn’t currently allow changing serialized fields on prefab assets, and I’d like to ask whether adding this is planned or feasible. At least I'd like to understand is cursor's auto agent model couldn't find it so how can I set rules or prompts to fix that.
Use case
I needed to assign sprite references to new [SerializeField] slots on a MonoBehaviour that lives on a prefab (e.g. HiddenObjects.cs with fields like binocularsSprite, hatSprite, etc.). The goal was to wire up assets from Assets/_Game/Sprites/Objects/ to the prefab’s component without opening Unity’s Prefab editor by hand.
What my agent tried
manage_components with action: "set_property": It used the prefab asset path as target (e.g. _Game/Prefabs/Objects/ObjectHolder.prefab) and search_method: "by_path". The call failed with something like: “Target GameObject ('_Game/Prefabs/...') not found using method 'by_path'.” So it seems the tool only resolves GameObjects in the current scene, not prefab assets on disk.
manage_asset with action: "modify": I wasn’t able to see a way to pass component-level properties (e.g. sprite references) for a prefab, only higher-level asset metadata.
Current workaround
It edited the .prefab YAML by hand and added the new sprite references (e.g. binocularsSprite: {fileID: 21300000, guid: ..., type: 3}) using GUIDs from the sprite .meta files, then triggered a refresh. That works but is brittle and not ideal for automation.
My Agent's Suggestion
It would be very useful if the MCP could update serialized fields on prefab assets (not only on scene instances), for example by:
Extending manage_components so that target can be a prefab asset path (and optionally a path to a child GameObject inside the prefab), and so that set_property applies to that prefab’s serialized data, or
Adding a dedicated action (e.g. under manage_asset or manage_prefabs) like “set prefab component property” that takes an asset path, component type, property name, and value (e.g. object reference by GUID).
I’d be happy to add more detail or use cases if that would help.