Luaコンポーネント作成
dx12_create_lua_componentCreate a validated Lua component file and get its path for attaching to entities.
Instructions
Lua コンポーネント(.lua)を assets/components/ に作成する。書き込み前に構文検証され、エラーなら書かず error を返す。返り値 {path} を dx12_attach_lua_component の script に渡す。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Lua コード全体。properties / OnStart / OnUpdate を含められる。 | |
| name | Yes | コンポーネント名(拡張子・パス区切りなし)。例: Health |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | エンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。 |