Hi everyone,
I’ve been working with level streaming recently and I wanted to create a tool to manage level transform dynamically.
At first I was using a persistent level that stores data and I loaded levels with streaming volumes and I had the following code that should move the level using a given transform:
ULevelStreaming* level = UGameplayStatics::GetStreamingLevel(GetWorld(), "Level");
if (level != nullptr) {
UE_LOG(LogTemp, Warning, TEXT("Level find"));
level->LevelTransform = MapTransform;
level->SetShouldBeLoaded(true);
level->SetShouldBeVisible(true);
UE_LOG(LogTemp, Warning, TEXT("%s"), *level->LevelTransform.ToString());
}
else {
UE_LOG(LogTemp, Warning, TEXT("Level failed to be find"));
}
It did not work, but at the second I used world composition it started to work and I don’t understand why ?