I’m trying to get triangles from my mesh like this:
void UMyFunctionLibrary::InvestigateTris(UStaticMesh* Mesh, FVector Point, FTransform Transform, UObject* Outer)
{
auto SMDesc = Mesh->CreateStaticMeshDescription(Outer);
UE_LOG(LogTemp,Warning,TEXT("%d"), SMDesc->Triangles().Num())
auto Desc = Mesh->CreateMeshDescription(0);
UE_LOG(LogTemp,Warning,TEXT("%d"), Desc->Triangles().Num())
}
I’m getting the mesh from editor like this
But both logs say that there are 0 triangles in my static mesh this is the same if I pass null as Outer and the function auto generates the outer by package