Hello
I’m currently creating a plugin which is supposed to spawn ALandscape along with LandscapeStreamingProxies (Similar to the default world)
This is a part of the code that let me spawn a Landscape (which works), how do I add LandscapeStreamingProxies to it?
Landscape->SetActorTransform(LandscapeTransform);
Landscape->Import(FGuid::NewGuid(),0,0,SizeX - 1, SizeY - 1,SectionsPerComponent,QuadsPerComponent,
HeightDataPerLayers,nullptr,MaterialLayerDataPerLayers,ELandscapeImportAlphamapType::Additive);
Landscape->StaticLightingLOD = FMath::DivideAndRoundUp(FMath::CeilLogTwo((SizeX * SizeY) / (2048 * 2048) + 1), (uint32)2);
// Register all the landscape components
ULandscapeInfo* LandscapeInfo = Landscape->GetLandscapeInfo();
LandscapeInfo->UpdateLayerInfoMap(Landscape);
Landscape->RegisterAllComponents();
// Need to explicitly call PostEditChange on the LandscapeMaterial property or the landscape proxy won't update its material
FPropertyChangedEvent MaterialPropertyChangedEvent(FindFieldChecked< FProperty >(Landscape->GetClass(), FName("LandscapeMaterial")));
Landscape->PostEditChangeProperty(MaterialPropertyChangedEvent);
Landscape->PostEditChange();