Adding custom files to the Android content.
I'm currently implementing a third party library to the UE4. The library itself is already implemented and it's initializing but to the proper work it needs a path to the file (the certificate, precisely).
On Windows it's easy, I'm just putting the file into the MyProject\Content directory and then I'm getting the path using:
But when I'm trying to add this file to the Android apk, or iOS ipa... well, I'm lost here. The builder is not packing all files from the Content folder. How should it be done?
asked Oct 21 '14 at 12:50 PM in Using UE4
Well, it's quite complicated, but for now to get proper absolute path to the content file I'm using such code:
For development mode works well.
answered Nov 13 '14 at 02:15 PM
On UE 4.7.3 I found a better solution.
On Android I'm using a PathToAndroidPaths function from Engine\Source\Runtime\Core\Private\Android\AndroidFile.cpp
On IOS I'm using a ConvertToIOSPath function from Engine\Source\Runtime\Core\Private\IOS\IOSPlatformFile.h
On PC I'm using a FPaths::ConvertRelativePathToFull function from Engine\Source\Runtime\Core\Public\Misc\Paths.h
Most of those function are private, so I made a new, public function that use them for converting relative path to the absolute one.
The ConvertRelativePathToFull from FPaths works correctly only for PC, it doesn't return correct absolute paths for mobile devices.
answered Jun 10 '15 at 07:57 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here