Modify a component property. Args: component_type: Component type name prop: Property name to modify value: New value for the property target: Target GameObject name target_id: Target GameObject instance ID Returns:
(
self,
component_type: str,
prop: str,
value: Any,
target: str | None = None,
target_id: int | None = None,
)
| 82 | return self._conn.send_request("component", params) |
| 83 | |
| 84 | def modify( |
| 85 | self, |
| 86 | component_type: str, |
| 87 | prop: str, |
| 88 | value: Any, |
| 89 | target: str | None = None, |
| 90 | target_id: int | None = None, |
| 91 | ) -> dict[str, Any]: |
| 92 | """Modify a component property. |
| 93 | |
| 94 | Args: |
| 95 | component_type: Component type name |
| 96 | prop: Property name to modify |
| 97 | value: New value for the property |
| 98 | target: Target GameObject name |
| 99 | target_id: Target GameObject instance ID |
| 100 | |
| 101 | Returns: |
| 102 | Dictionary with modification result |
| 103 | """ |
| 104 | params: dict[str, Any] = { |
| 105 | "action": "modify", |
| 106 | "type": component_type, |
| 107 | "prop": prop, |
| 108 | "value": value, |
| 109 | } |
| 110 | if target: |
| 111 | params["target"] = target |
| 112 | if target_id is not None: |
| 113 | params["targetId"] = target_id |
| 114 | return self._conn.send_request("component", params) |
| 115 | |
| 116 | def remove( |
| 117 | self, |