Download

Downloading assets onto phone

Hello,

I’m working on an app that requires the use of many texture files. Currently I’m packaging all those in the .apk. However, in order to scale the app, more textures will have to be loaded, breaking Oculus’ 500mb maximum .apk file size limit. I’ve experimented with using the Download Image BP node tied to dynamic instanced materials and things seem to be working well with this approach, however, this means that the images get downloaded every single time the user opens the app, and this can be a significantly time consuming process and also require data connection for each time the app runs.

I’m interested in a solution to load up images in dynamic instanced materials from a specific folder on the phone and, ideally, have the app download images to the phone in that specific folder.

Many thanks,
George

I answered your question in the Android forum. You can save the downloading image in UAsyncTaskDownloadImage::HandleImageRequest() to your cache directory to load later if you modify it. You will want to save and load from the GExternalFilePath (data directory associated with your APK). You can access it this way:


#if PLATFORM_ANDROID
extern FString GExternalFilePath;
#endif

Got it and thanks for the fast reply. I guess now I only need to find someone who works with C++ to help me implement your solutions as there doesn’t appear to be a way to do this via BP.