Search in

Sort by:

Everything Using UE4

Current Space

Question Status:

All Questions With Answer With Accepted Answer

Quick results

Search help

Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both.
Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.

You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with
each other. Examples

UE4Game folder on External Storage - Android

0

Hello UE Team, I wanted to know whether it's possible to prevent a ue4 android game to create a folder (UE4Game and its content) automatically in External storage? I want to have it on internal data folder (like android/data/com../UE4Game/) so the user can't see the save games easily (e.g)

Same question. Another pain is that when app was uninstalled, the UE4Game folder will not be auto removed. I think that is a bad user experience. Why design this like that? Is there any pros or limitation?

I found a global variable GFilePathBase at line 865 in file \Engine\Source\Runtime\Launch\Private\Android\AndroidJNI.cpp. It is assigned to ExternalStorageDirectory(/storage/sdcard0) of Android. And another global variable GExternalFilePath at line 926 is assigned to ExternalFilesDir(/storage/sdcard0/Android/data/package/files), I think this is what we looking for. But now I don't have any idea to modify it to suit this purpose. Maybe someone else has any idea or experience?

Any files placed in GExternalFilePath will be cleaned up when the APK is uninstalled. You can make this change in AndroidJNI.cpp to ue4_GameActivity_nativeSetGlobalActivity after GExternalFilePath = FString(nativeExternalFilesPathString):

#if UE_BUILD_SHIPPING
GFilePathBase = GExternalFilePath;
#endif

This will use the external file path for shipping builds. You don't want to do this for launch-on since it expects to find the pushed files in the normal location.

I am planning to provide this as a checkbox option in 4.15; the feature set for 4.14 is already locked down.

Hi, Chris. Is this the checkbox that you said? If yes, is the functionality implemented yet? No matter i check or uncheck the Use ExternalFilesDir for UE4Game files, the UE4Game folder is always be created outside of the Android/data/ folder.

There will create UE4Game and obb two folder under /storage/sdcard0, and create a game project folder under /storage/sdcard0/Android/data but only contain ca-bundle.pem and login-identifier.txt two files. All files of project are still placed in /storage/sdcard0/UE4Game, not in /storage/sdcard0/Android/data.

And the Install Location option on the picture seems no use either. So is the only way that I want to place my whole game content into /storage/sdcard0/Android/data folder is to modify the source code of the engine??

PS: I tried in development build and shipping build are the same result.

There are serious problems. If user doesn't have external sdcard, UE4Game folder is created in Internal storeage and It will not be removed when uninstall. And another problem is that All game resource images are shown in gallery app.