Hello! I’ve been attempting to use level streaming for my game, but I’ve come across an issue. First, I selected a random level from a data table. After I loaded that level in, I called the level instance’s GetLoadedLevel() which returned a nullptr. This is a problem, since I am attempting to get a specific actor from that level instance. The level instance loads into the editor just fine, so I’m not sure what’s wrong. Is there something I’m missing? If anyone needs more information, please ask.
// Get random level
TileID = Seed.RandRange(1, RoomsTableLength);
RoomInformation = RoomsTable->FindRow<FRoomInformation>(RoomsNames[TileID - 1], "");
// Load the level instance
RoomLevel = ULevelStreamingDynamic::LoadLevelInstanceBySoftObjectPtr(GetWorld(), RoomInformation->Level, FTransform(FRotator(0,0,0), FVector(0,0,0), FVector(1,1,1)), bIsLevelLoadSucessful);
// GetLoadedLevel() returns nullptr
check(RoomLevel->GetLoadedLevel());