UDynamicMeshComponent::ValidateMaterialSlots

Compute the maximum MaterialID on the DynamicMesh, and ensure that Material Slots match.

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryFramework

Header

/Engine/Source/Runtime/GeometryFramework/Public/Components/DynamicMeshComponent.h

Include

#include "Components/DynamicMeshComponent.h"

Source

/Engine/Source/Runtime/GeometryFramework/Private/Components/DynamicMeshComponent.cpp

Syntax

bool ValidateMaterialSlots
(
    bool bCreateIfMissing,
    bool bDeleteExtraSlots
)

Remarks

Compute the maximum MaterialID on the DynamicMesh, and ensure that Material Slots match. Pass both arguments as false to just do a check.

Returns

true if at the end of this function, Material Slot Count == Max MaterialID

Parameters

Parameter

Description

bCreateIfMissing

if true, add extra (empty) Material Slots to match max MaterialID

bDeleteExtraSlots

if true, extra Material Slots beyond max MaterialID are removed