/Engine/Source/Runtime/GeometryFramework/Public/Components/DynamicMeshComponent.h
Compute the maximum MaterialID on the DynamicMesh, and ensure that Material Slots match. Pass both arguments as false to just do a check.
true if at the end of this function, Material Slot Count == Max MaterialID
bool ValidateMaterialSlots ( bool bCreateIfMissing, bool bDeleteExtraSlots )