Luaコンポーネントアタッチ
dx12_attach_lua_componentAttach a Lua component to an entity using a relative script path. The component activates on Play, allowing runtime initialization and updates.
Instructions
Lua コンポーネントをエンティティにアタッチする。エディタ上では貼るだけで、実際の初期化/実行は Play 時(OnStart/OnUpdate)。script は assets 相対(assets 配下限定)。即時反映で ok を返す。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | エンティティ名(完全一致)。id の代わりに使える。Stop 後など id が変わる場面で安定。 | |
| entity | No | エンティティ id(int)。name と排他。 | |
| script | Yes | assets 相対パス。例: components/Health.lua |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | エンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。 |