Navigation
API > API/Plugins > API/Plugins/ModelingComponents
Information about the materials assigned to a StaticMesh LOD. The StaticMesh stores a Material List and per-mesh-Section assignments into that Material List. This relationship is not necessarily 1-1, multiple Sections can use the same material, and there can be arbitrary remappings, and the storage of this information is somewhat scattered across StaticMesh. This data structure encapsulates the critical information needed to (eg) assign materials to a new mesh/component such that they match the rendered materials on an existing StaticMesh.
The GetStaticMeshAssetMaterials() function can be used to build this data structure for a given StaticMesh LOD.
| Name | FStaticMeshLODMaterialSetInfo |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/AssetUtils/StaticMeshMaterialUtil.h |
| Include Path | #include "AssetUtils/StaticMeshMaterialUtil.h" |
Syntax
struct FStaticMeshLODMaterialSetInfo
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LODIndex | int32 | LOD Index the data below refers to | AssetUtils/StaticMeshMaterialUtil.h | |
| MaterialSlots | TArray< FStaticMeshMaterialSlot > | MaterialSlots array is a copy of the UStaticMesh::StaticMaterials array/data | AssetUtils/StaticMeshMaterialUtil.h | |
| NumSections | int32 | Number of Sections on the mesh LOD | AssetUtils/StaticMeshMaterialUtil.h | |
| SectionMaterials | TArray< UMaterialInterface * > | The Material assigned to each Section, in linear order | AssetUtils/StaticMeshMaterialUtil.h | |
| SectionSlotIndexes | TArray< int32 > | The index into MaterialSlots array of the Material assigned to each Section, in linear order | AssetUtils/StaticMeshMaterialUtil.h |