テクスチャ上書き割当
dx12_set_textureAssign a texture to an entity's MeshRenderer using per-instance overrides, avoiding material sharing. Supports albedo, normal, and metal roughness slots with optional submesh index.
Instructions
エンティティの MeshRenderer にテクスチャを割り当てる(Inspector のアセットブラウザ D&D と同じ操作)。Material はモデル共有なので直接触らず、インスタンス単位の override に書く=他のインスタンスに波及しない。slot は albedo(既定)/normal/metalRoughness、submesh はサブメッシュ index(既定 0)。path 空文字で解除(Material 既定に戻る)。即時反映。entity(id) か name 指定。スプライトのテクスチャは set_component(sprite2d, {texturePath}) の方。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | エンティティ名(完全一致)。id の代わりに使える。Stop 後など id が変わる場面で安定。 | |
| path | Yes | assets 相対パス(例: textures/rust.png)。空文字で override 解除。 | |
| slot | No | テクスチャスロット。省略で albedo。 | |
| entity | No | エンティティ id(int)。name と排他。 | |
| submesh | No | サブメッシュ index。省略で 0。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | エンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。 |