How to Adjust Transform of Loaded Streaming Level in C++

In Blueprint we have the following function

How can we achieve the same in C++ and control the location and rotation of the loaded level? I have the following code, but it’s not working, and the transform remains unaffected.

void AStreamingLevelController::LoadNextStreamingLevel()
{
	FLatentActionInfo LatentInfo;

	UGameplayStatics::LoadStreamLevel(
		GetWorld(),
		LevelToLoadName,
		true,
		true,
		LatentInfo
	);

	ULevelStreaming* LevelStreaming = UGameplayStatics::GetStreamingLevel(GetWorld(), LevelToLoadName);

	LevelStreaming->LevelTransform = LoadLevelTriggerActor->GetTransform();
}

No matter where LoadLevelTriggerActor is, I get the same result. How can I control its transform?

The LevelTransform is used when the sublevel is made visible, and you’ve passed the bMakeVisibleAfterLoad and bShouldBlockOnLoad parameters both as true, so the sublevel is made visible during the call to LoadStreamLevel, prior to you setting LevelTransform. Try setting bMakeVisibleAfterLoad to false and then making the sublevel visible after setting LevelTransform.