Assign Landscape Layer Info - not saving

Hey! I am using plugin to assign Landscape Layer Info to my landscape. It assigns the layer, but this changed is never saved, also, seems like it applies it only ‘visually’ in GUI, but not actually (hence, probably, that is why not saving). I am probably missing some small line of code, but still can’t get it work… Here is relevant code part:

    FStringAssetReference landscapeLayerPath3("LandscapeLayerInfoObject'/Game/DeadHillsLandscape/Maps/Overview/Overview_sharedassets/Layer_03_LayerInfo.Layer_03_LayerInfo'");
UObject* landscapeLayerObject3 = landscapeLayerPath3.TryLoad();
this->landscapeLayerInfoObject3 = nullptr;

if (landscapeLayerObject3 != nullptr)
{
	this->landscapeLayerInfoObject3 = Cast<ULandscapeLayerInfoObject>(landscapeLayerObject3);
}

   for (TActorIterator<ALandscapeProxy> ActorIt(world); ActorIt; ++ActorIt)
{

	ULandscapeInfo* Info = ActorIt->GetLandscapeInfo();

	FLandscapeInfoLayerSettings& LayerSettings = Info->Layers[0];

	if (LayerSettings.LayerInfoObj == nullptr)
	{
		LayerSettings.Owner = *ActorIt;
		LayerSettings.LayerInfoObj = this->landscapeLayerInfoObject3;
		LayerSettings.bValid = true;
	}

            if (GEngine != nullptr)
	{
		Info->UpdateLayerInfoMap(*ActorIt, false);
		ActorIt->Modify(true);
		ActorIt->UpdateAllComponentMaterialInstances();
		ActorIt->MarkPackageDirty();
		GEngine->BroadcastLevelActorListChanged();
		Info->MarkPackageDirty();

	}

    const bool bPromptUserToSave = false;
const bool bSaveMapPackages = true;
const bool bSaveContentPackages = true;
const bool bFastSave = false;
const bool bNotifyNoPackagesSaved = false;
const bool bCanBeDeclined = false;

if (!FEditorFileUtils::SaveDirtyPackages(bPromptUserToSave, bSaveMapPackages, bSaveContentPackages, bFastSave, bNotifyNoPackagesSaved, bCanBeDeclined))
{
	UE_LOG(LogTemp, Error, TEXT("WHELP WE WERE NOT SAVED!"));
	this->actionAssignLayersToLandscapes = false;
	return;
}

Only just slightly late with this one, but I found the following worked for me:

InfoObject->LayerName = LandscapeLayerSettings.LayerName;
InfoObject->bNoWeightBlend = false;

if (!LandscapeLayerSettings.LayerInfoObj)
{
    LandscapeLayerSettings.Owner = Landscape;
    LandscapeLayerSettings.bValid = true;
    LandscapeLayerSettings.LayerInfoObj = InfoObject;
    LandscapeLayerSettings.GetEditorSettings().LayerInfoObj = InfoObject;
}