Skip to content

manage_components set_property cannot target specific component when multiple of same type exist #1014

@dsarno

Description

@dsarno

Problem

When a GameObject has multiple components of the same type (e.g., three instances of a custom FlowReductionEventDriver MonoBehaviour), manage_components with action: set_property always targets the first matching component. There is no way to specify which component instance to modify.

Steps to Reproduce

  1. Add 3 instances of the same component type to a GameObject
  2. Use manage_components set_property with component_type to set a property
  3. Only the first component instance is ever modified — the second and third are unreachable

Expected Behavior

Ability to target a specific component instance, e.g. by:

  • Component instance ID (already returned by the add action in componentInstanceID)
  • Component index on the GameObject
  • Some other disambiguator

Workaround

Currently have to ask the user to wire the remaining components manually in the Unity Inspector, which defeats the purpose of the MCP tooling.

Context

This comes up when a pattern calls for multiple instances of a driver component on the same GameObject, each configured with different event references and targets (e.g., one per vessel path for bloodflow reduction).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions