FStaticMeshComponentAdapter

Adapter which takes a Static Mesh Component instance to use for material baking (does not allow for changes to the underlying asset itself)

Unreal Engine C++ API Reference > Developer > MeshMergeUtilities

Inheritance Hierarchy

References

   
Module MeshMergeUtilities
Header /Engine/Source/Developer/MeshMergeUtilities/Public/StaticMeshComponentAdapter.h
Include #include "StaticMeshComponentAdapter.h"

Syntax

class FStaticMeshComponentAdapter : public [IMaterialBakingAdapter](API\Developer\MeshMergeUtilities\IMaterialBakingAdapter)  

Remarks

Adapter which takes a Static Mesh Component instance to use for material baking (does not allow for changes to the underlying asset itself)

Variables

Type Name Description
int32 NumLODs  
UStaticMesh ... StaticMesh  
UStaticMeshComp... StaticMeshComponent End IMaterialBakingAdapter overrides

Constructors

Type Name Description
  FStaticMeshComponentAdapter ( UStaticMeshComponent* InStatic... )  

Overridden from IMaterialBakingAdapter

Type Name Description
int32 AddMaterial ( UMaterialInterface* Material, const FName& SlotName, const FName& ImportedSlotName ) Adds a new material to the underlying asset/data and specify the slot names
int32 AddMaterial ( UMaterialInterface* Material ) Adds a new material to the underlying asset/data
void ApplySettings ( int32 LODIndex, FMeshData& InOutMeshData ) Ability to apply custom settings to the FMeshData structure
FString GetBaseName () Returns base name to use for newly created assets
FBoxSphereBo... GetBounds () Returns bounds of underlying data
FName GetImportedMaterialSlotName ( int32 MaterialIndex ) Returns the importer material slot name for the given index
int32 GetMaterialIndex ( int32 LODIndex, int32 SectionIndex ) Returns the material index for the given lod and section index
FName GetMaterialSlotName ( int32 MaterialIndex ) Returns the material slot name for the given index
int32 GetNumberOfLODs () Begin IMaterialBakingAdapter overrides
UPackage ... GetOuter () Returns outer package to use when creating new assets
bool IsAsset () Returns whether or not the underlying data is an UAsset
int32 LightmapUVIndex () Returns lightmap UV index used by mesh data
void RemapMaterialIndex ( int32 LODIndex, int32 SectionIndex, int32 NewMaterialIndex ) Remaps the material index for the given lod and section index to the specified new one
void RetrieveMeshSections ( int32 LODIndex, TArray< FSectionInfo >& InOutSecti... ) Retrieves all mesh sections from underlying data
void RetrieveRawMeshData ( int32 LODIndex, FMeshDescription& InOutRawMesh, bool bPropagateMeshData ) Retrieves model data in FMeshDescription form
void SetMaterial ( int32 MaterialIndex, UMaterialInterface* Material ) Sets material index to specified material value
void UpdateUVChannelData () Update UV channel data on object the adapter represents

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library