How to avoid EnsureCanStreamBulkData in 5.1?

Hey!

In order to manage memory efficiently, I am loading textures for my large 2D map with soft pointers, and when users scrolls the map, I am unloading them from memory.

This worked under UE4, but now I am triggering “EnsureCanStreamBulkData”

There is extenstive explanation for it inside source code:

/**

  • Triggers an ensure when trying to stream inline bulk data. This is to prevent
  • inconsistencies between the Zen loader loading from I/O store (utoc/ucas) and the legacy EDL loader using
  • the file system (.pak). The Zen loader currenlty does not allow reloading of inline bulk data.
  • The trigger can be ignored by setting [Core.System]IgnoreInlineBulkDataReloadEnsures to true in the config file.
  • Ignoring this ensure will most likely break loading of bulk data when packaging with Zen/IO store (.utoc/.ucas).
    */

What options do I have here? I do not want textures to stay in memory, because my map is very large, I need to unload them somehow 0___0

I’m getting the same error when I try to read data from texture.

FTexture2DMipMap* Mip0 = &AreasMap->GetPlatformData()->Mips[0];
FByteBulkData* RawImageData = &Mip0->BulkData;
const FColor* PixelData = reinterpret_cast<const FColor*>(RawImageData->Lock(LOCK_READ_ONLY));

Everything works just fine in the editor but in a packaged build I’m getting blank color data.

I have the same error with Blueprint (Add Runtime Candidate Image, for AR session)