DynamicMeshComponent is slower then ProceduralMeshComponent?

I found an option to edit individual vertexes without calling EditMesh().

#include "Util/DynamicVector.h"

UDynamicMesh* DynMesh2 = DynamicMeshComponent->GetDynamicMesh();
FDynamicMesh3* DynMesh3 = DynamicMeshComponent->GetMesh();

/* Прямое редактирование меша по ссылке на массив вертексов */
// Get vertexs by reference
UE::Geometry::TDynamicVector<FVector3d> Vert = DynMesh3->GetVerticesBuffer();
Vert[0] = FVector3d{ 0, 0, 222 };
Vert[1] = FVector3d{ 0, 0, 222 };
Vert[2] = FVector3d{ 0, 0, 222 };
DynMesh3->UpdateChangeStamps(true, false);		// update mesh

// or
// DynamicMeshComponent->FastNotifyPositionsUpdated();
1 Like