Update
- Builds that work - PIE PC and Mac, packaged for distribution PC
- Builds that fail - Packaged for distribution MAC, iOS, Cooked DebugGame on PC
This is probably user error, but it’s code that’s worked since 4.4ish and works on PC (including packaged builds).
My game has multiple minigames. Minigames can specify a level to load by name (stored in some json). Levels are stored as sublevels on the base level that is loaded.
They are then loaded through C++ or blueprint. Or not loaded in the case of 4.15…
Error seen:
LogStreaming:Error: Couldn't find file for package /Game/Levels/Speedy/SpeedyLevel.
That trailing ‘.’ is pretty suspicious. I haven’t told it about Levels/Speedy - just using the level name as seen in the levels window to specify what to load.
Side note: I also notice that the core level takes 1.6 seconds to load despite it containing only a single camera. Excessive?
I’ve tried a couple of approaches to making it work - 1) The original (probably nearly two years of just working ™)
ULevelStreaming *pStreaming = UGameplayStatics::GetStreamingLevel(pWorld, LevelToLoad);
if (pStreaming)
{
pStreaming->bShouldBeLoaded = true;
pStreaming->bShouldBeVisible = m_bShowRequested;
LevelVerbosef(_T("FLevelLink::Load loading '%s'"), *LevelName);
}
And also:
FLatentActionInfo LatentInfo;
UGameplayStatics::LoadStreamLevel(mp_World.Get(), LevelToLoad, m_bShowRequested, false, LatentInfo);
If I right click on the SpeedyLevel and get a reference then I get this:
World'/Game/Levels/Speedy/SpeedyLevel.SpeedyLevel'
Looking in the iOS cookeddata folder the umap (and other data) exists as you’d expect.
As far as I can tell PC works correctly, though now I’m going to dive back in and see if I can force the same error.