UPrimitiveComponent::GetMaterial

Returns the material used by the element at the specified index

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UPrimitiveComponent::GetMaterial()

UMeshComponent::GetMaterial()

UGeometryCacheComponent::GetMaterial()

UDEPRECATED_GoogleARCoreFaceMeshComponent::GetMaterial()

PAPER2UPaperSpriteComponent::GetMaterial()

UWidgetComponent::GetMaterial()

PAPER2UPaperGroupedSpriteComponent::GetMaterial()

PAPER2UPaperTileMapComponent::GetMaterial()

PAPER2UPaperFlipbookComponent::GetMaterial()

UGroomComponent::GetMaterial()

UAppleARKitFaceMeshComponent::GetMaterial()

UBaseDynamicMeshComponent::GetMaterial()

UGeometryCollectionComponent::GetMaterial()

ULidarPointCloudComponent::GetMaterial()

UStaticMeshComponent::GetMaterial()

USkinnedMeshComponent::GetMaterial()

UGeometryCacheComponent::GetMaterial()

UMaterialBillboardComponent::GetMaterial()

UDEPRECATED_GoogleARCoreFaceMeshComponent::GetMaterial()

UMRMeshComponent::GetMaterial()

PAPER2UPaperSpriteComponent::GetMaterial()

UImagePlateComponent::GetMaterial()

UModelComponent::GetMaterial()

UWidgetComponent::GetMaterial()

PAPER2UPaperGroupedSpriteComponent::GetMaterial()

PAPER2UPaperTileMapComponent::GetMaterial()

UVirtualHeightfieldMeshComponent::GetMaterial()

UTextRenderComponent::GetMaterial()

PAPER2UPaperFlipbookComponent::GetMaterial()

UGroomComponent::GetMaterial()

UAppleARKitFaceMeshComponent::GetMaterial()

UBaseDynamicMeshComponent::GetMaterial()

UGeometryCollectionComponent::GetMaterial()

ULidarPointCloudComponent::GetMaterial()

UStaticMeshComponent::GetMaterial()

ULandscapeComponent::GetMaterial()

USkinnedMeshComponent::GetMaterial()

UParticleSystemComponent::GetMaterial()

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h

Include

#include "Components/PrimitiveComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/PrimitiveComponent.cpp

Syntax

virtual UMaterialInterface * GetMaterial
(
    int32 ElementIndex
) const

Remarks

Returns the material used by the element at the specified index

Returns

the material used by the indexed element of this mesh.

Parameters

Parameter

Description

ElementIndex

The element to access the material of.