(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Thanks for . I’ve been working on my own similar solution for the last few weeks in my spare and while I got something working I find your method a better implementation than what I had going.

The only thing I notice is that the level loaded callback doesn’t seem to work when using your method. Do you have any idea why is? Right now I use that to determine when the levels are loaded and streamed in so I can do the next step in my process.

Here is my original function in which the callback did fire.





void ADreamProjectGameMode::SetupNonStreamingLevelLoad()
{  
	auto positionOffset = FVector();
	auto mapNames = GetAllMapNames();
	for (auto mapName : mapNames)
	{ 
		FString fullMapPath = FString::Printf(TEXT("/Game/Rooms/Maps/%s"), *mapName);
		UE_LOG(LogTemp, Warning, TEXT("Loading level %s"), *fullMapPath); 
		ULevelStreaming* pStreaming = UGameplayStatics::GetStreamingLevel((), *fullMapPath);

		if (pStreaming)
		{
			UE_LOG(LogTemp, Warning, TEXT("Streaming level setup for %s with transform offset of %f "), *fullMapPath, positionOffset.Y);
			//pStreaming->LevelTransform = FTransform(positionOffset); 
			pStreaming->bShouldBeLoaded = true;
			pStreaming->bShouldBeVisible = true;
			pStreaming->OnLevelLoaded.AddDynamic(, &ADreamProjectGameMode::OnLevelLoaded);
			numLevelsToLoad++;
			positionOffset.X += 10;
		}
		else
		{
			UE_LOG(LogTemp, Warning, TEXT("Unable toload map %s"), *fullMapPath);
		}
	} 
}