Command · component
component.add
Add a component to an entity, with optional initial values.
scope edit:scenenot idempotentnon-destructive
Params
Typed as ComponentAddParams. Fields marked * are required.
entity*
entityTarget entity; may be inside a prefab instance (stored as an override).
required
component*
stringComponent type name (
Light).required
value
option<json>Initial field values; absent uses every default.
default null
Examples
JSON (MCP ara_apply, batches)
{
"cmd": "component.add",
"args": {
"entity": "e_8b21",
"component": "Transform",
"value": {
"position": [
0,
1,
0
]
}
}
}CLI
ara do component.add --args '{"entity":"e_8b21","component":"Transform","value":{"position":[0,1,0]}}' --why "…"