コンポーネント設定
dx12_set_componentSets or replaces a component on an entity by JSON key and data. Adds if missing, replaces if exists. Returns entity and component details.
Instructions
コンポーネントを設定(無ければ追加・あれば置換)。component は jsonKey、data は dx12_describe_components の形。tags は data=文字列配列、DataComponent(data) は {key:{t,v}} オブジェクト。即時反映で {entityId, component} を返す。形が不安なら先に dx12_describe_components を見るとええ。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | コンポーネントの値。オブジェクト or 配列(tags は文字列配列)。dx12_describe_components の fields に合わせる。 | |
| name | No | エンティティ名(完全一致)。id の代わりに使える。Stop 後など id が変わる場面で安定。 | |
| entity | No | エンティティ id(int)。name と排他。 | |
| component | Yes | jsonKey。例: pointLight, directionalLight, spotLight, camera, rigidBody, boxCollider, transform, tags, data, particleEmitter, trailRenderer, networkIdentity, networkTransform, sprite2d, audioSource, trigger |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | エンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。 |