BUG? FStreamableManager do not set packages with PKG_PlayInEditor flag, if PlayInEditor

FStreamableManager do not set packages with PKG_PlayInEditor flag, if PlayInEditor.

For example this leads to crash if i load map file using FStreamableManager, and then try to use UGameplayStatics::OpenLevel on that map.

This can be fixed though, if i use following code, after FStreamableManager loaded package:

 if(CurrentWorld->WorldType == EWorldType::PIE)
     {
     LoadedPackage->GetOutermost()->PackageFlags |= PKG_PlayInEditor;
     }

But i think FStreamableManager should do that when calling LoadPackageAsync.

thx.

PS: the same for UEngine::PrepareMapChange i suppose.

Hi,

Currently we using FStreamableManager only for loading shared assets. Shared assets do not need PKG_PlayInEditor flag. PKG_PlayInEditor flags is required only for level packages and is set when we do level streaming or level traveling. Not sure if we going to support loading level packages using FStreamableManager.

hi,
can u plz explain what u mean by " Shared assets"?

Hi @ddvlost,

Do you know if we can now use FStreamableManager for async map loading or if we still need to make our own MapLoader with LoadPackageAsync, just as you said here :

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/47363-how-to-open-level-asynchronously-without-visible-after-load?76088-How-to-open-level-asynchronously-without-visible-after-load=

Best regards everyone,

Alex

Edit : if not, it could be great to implement it because the returned FStreamableHandle is perfect to know how assets needs to be loaded, are currently loaded and how many assets remaining to be load.