Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Components > API/Runtime/Engine/Components/UPrimitiveComponent
- UPrimitiveComponent::SetMaterial()
- UHeterogeneousVolumeComponent::SetMaterial()
- UMaterialBillboardComponent::SetMaterial()
- UMeshComponent::SetMaterial()
- UHeterogeneousVolumeComponent::SetMaterial()
- UParticleSystemComponent::SetMaterial()
- UTextRenderComponent::SetMaterial()
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 |
UFUNCTION (BlueprintCallable, Category="Rendering|Material")
virtual void SetMaterial
(
int32 ElementIndex,
class UMaterialInterface * Material
)
Remarks
Changes the material applied to an element of the mesh. the material used by the indexed element of this mesh.
Parameters
| Name | Description |
|---|---|
| ElementIndex | The element to access the material of. |