Here's a snippet - am I missing something obvious / vital?

Code:

//URuntimeMeshComponent* NewTile = CreateDefaultSubobject<URuntimeMeshComponent>(TEXT("TerrainTile")); URuntimeMeshComponent* NewTile = NewObject<URuntimeMeshComponent>(); NewTile->SetupAttachment(RootComponent); //NewTile->bUseComplexAsSimpleCollision = true; //NewTile->bShouldSerializeMeshData = true; NewTile->SetRelativeLocation(RelativeTileLocations[TilesToSpawn - 1]); TArray<FVector> Vertices; for (int i = 0; i < TilesPerAxis; i++) for (int j = 0; j < TilesPerAxis; j++) { FVector NewVert = FVector(0, 0, 0); NewVert.X = j * (TileSize / TilesPerAxis); NewVert.Y = i * (TileSize / TilesPerAxis); Vertices.Add(NewVert); } int32 NumRowsColumns = FMath::TruncToInt(FMath::Sqrt(Vertices.Num())); TArray<FVector2D> UVs; //££ Todo: Duplicate UVs into Lightmap UVs. TArray<FVector2D> LightmapUVs; //Calculate UVs for(int i = 0; i < NumRowsColumns; i++) for (int j = 0; j < NumRowsColumns; j++) { FVector2D Coords = FVector2D(j * TileSize, i * TileSize); UVs.Add(Coords); } //Generate Tris TArray<int32> Triangles; UKismetProceduralMeshLibrary::CreateGridMeshTriangles(NumRowsColumns, NumRowsColumns, true, Triangles); //Calc Tangents TArray<FVector> Normals; TArray<FProcMeshTangent> KPTangents; UKismetProceduralMeshLibrary::CalculateTangentsForMesh(Vertices, Triangles, UVs, Normals, KPTangents); TArray<FRuntimeMeshTangent> Tangents; for (FProcMeshTangent Tangent : KPTangents) { FRuntimeMeshTangent NewTangent = FRuntimeMeshTangent(Tangent.TangentX, false); Tangents.Add(NewTangent); } //££ build black/white colour array. TArray<FLinearColor> VertexColours; //void URuntimeMeshComponent::CreateMeshSection_Blueprint(int32, const TArray<FVector, FDefaultAllocator> &, const TArray<ElementType, FDefaultAllocator> &, const TArray<FVector, FDefaultAllocator> &, const TArray<FRuntimeMeshTangent, FDefaultAllocator> &, const TArray<FVector2D, FDefaultAllocator> &, const TArray<FVector2D, FDefaultAllocator> &, const TArray<FLinearColor, FDefaultAllocator> &, bool, EUpdateFrequency)': cannot convert argument 7 from 'int' to 'const TArray<FVector2D, FDefaultAllocator> &' NewTile->CreateMeshSection_Blueprint(0, Vertices, Triangles, Normals, Tangents, UVs, LightmapUVs, VertexColours, true, EUpdateFrequency::Frequent); NewTile->SetMaterial(0, Material);

## Leave a comment: