Search in
Sort by:

Question Status:

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
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Saving and loading problem on android only

I'm using this save system in my game:

alt text

I have this system in 3 blueprints in my game scene which are going to be saving/loading data somewhere during run time. They're always on the "Event begin play" and "Event Construct" nodes.

When I need to save a value I use:

alt text

When I need to load a value I use:

alt text

and It works fine... In editor and development builds.

Now in shipping builds it's a whole different story.

First of all I have it it so the game is in one apk file and I have the "Use ExternalFilesDir for UE4Game Files" Option unchecked since I found it to be very prone to exploitation from the player, I also wanted the saves to be persistent through uninstalls. I added the following permissions to the "Extra Permissions" Section of the Advanced APK Packaging menu: android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_EXTERNAL_STORAGE android.permission.WRITE_INTERNAL_STORAGE android.permission.READ_INTERNAL_STORAGE

I also added the to the android manifest manually just in case.

If I build my APK as a development build, everything works fine, the APK asks for external storage permission on installation and the saving and loading work fine. When I try building my APK for distribution though the APK does not as for any permission and the saving and loading don't work, I then go inside the app permissions in my phone's settings menu and manually grant the game storage permission which makes the menu scene able to "sometimes" save and load a value or two, however the game scene is still unable to save/load anything.

I've been pulling my hair out on this issue for a while, testing it on multiple devices and trying a bunch of different solutions that proved fruitless such as trying the "Use ExternalFilesDir for UE4Game Files" option.

at the moment I'm at my wit's end and don't have a clue where to go from here, without this feature I really don't have a game, so any help you can provide my with is very very much appreciated.

Thanks in advance.

Product Version: UE 4.20
more ▼

asked Sep 13 '18 at 07:55 AM in Blueprint Scripting

avatar image

31 3 6 58

avatar image SHOBBIT Nov 11 '18 at 05:19 AM

I will +1 this too. The exact same issue is occuring with me too. The version is 4.19. When packing for distribution after putting my keystore file, the save system simply stops. When not packaging for distribution, it works fine.

In my case only when "Use ExternalFilesDir" is checked the save system works.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

Don't know if it's the full picture, but since the latest android patch, my device is not granting "storage" permissions to the game when installed from the PC. But you can go to "App Info" on the device and grant it manually, now my game is saving again. I wonder if it'll have this issue when installed from the Google Play. hope not.

I though it was 4.21, but it seems is not an issue on UE4 side. but on how Android treats Apps installed from wherever.

more ▼

answered Nov 11 '18 at 04:49 AM

avatar image

1.7k 8 3 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi did you had a chance to test on the "Google Play" side if it is working without extra permissions?

as per 4.21, the save slot file is in the PrivateStorage of the app so it should not required extra permissions. I opened a case on this. I will update here if I have a feedback.

As of today, I had to put the ExternalFileDir option to true in order to not block my development process, but I won't publish my game with this option set to true


more ▼

answered Jan 18 '19 at 11:47 PM

avatar image

494 43 68 154

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This issue is happening because the game has no Certificate. Unlike Development Build Version of the game, when installing the Shipping Build Android thinks it's a harmful app thus denies any permission by default (Without asking you). That's why you have to manually set permission in your Android Device.

If you create and install a certificate for your game or upload and download the game from Google Play Store the game will work just fine as expected.

Hope this helps!!! :-D

more ▼

answered Mar 08 '19 at 10:35 AM

avatar image

1 1 3

avatar image Elvince Mar 08 '19 at 10:58 AM

This is not true. I had a long talk with support of EPIC and they do confirm that we must check ExternalFileDir to have the file save in the ApplicationStorage. The name of the option is confusing, but as per our conversation that was validated by Epix Tech staff, this option allow in 4.21 to save the file at the right place. All those confusing stuff is linked to changed in API of google.


avatar image LightPS Mar 08 '19 at 11:03 AM

Thanks for this "Precious Info". This was a huge issue for publishing a game, I'm glad it's Solved.

avatar image GabusSiod Apr 10 '19 at 02:33 AM

I'm having the same problem, when using ExternalFileDir it works normally, if unchek stops working, how did you make it work without ExternalFileDir?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I'm still having the same problem, nothings seems to help and I'm really stumped... I removed any extra permissions and checked the ExternalFileDir option, uploaded to google play and downloaded to my test device.. and I'm still having the same problem. Thank you all for trying to help, Maybe UE4 is just not the right answer for android games.

more ▼

answered Mar 31 '19 at 01:20 PM

avatar image

31 3 6 58

avatar image LightPS Mar 31 '19 at 02:03 PM

Which android version are you using? Actually I was having the same problem but it was solved just by checking "ExternalFileDir" option and it worked perfectly fine. I am using UE 4.19.2

Can you please check some stuffs just to be sure - 1. After installing and playing for the first time if UE4Game folder is being created in the root folder of your Phone Memory or is it getting created inside Android -> Data -> com.xxx.xxx 2. Connections between Levels and related GameMode Blueprints of your game 3. Using LoadGameFromSlot Node while Loading a value 4. Default Maps and Modes in Project Settings 5. Try Other Devce 6. Try migrating into a new Project

I'm sending you my project's setting feel free to give it a shot if it can help you 1. Project Settings -> Project -> Packaging : link text

  1. Project Settings -> Platforms -> Android : link text

Rename them on change the extension from .txt to .ini

avatar image MicroGT Mar 31 '19 at 05:39 PM

I'm on android 8.1.0, the UE4Game folder is nowhere to be found, it's not on the root of the phone memory neither is it inside the game's folder in Data... all levels have the same GameMode blueprint, I'm using the LoadGameFromSlotNode to load values, my main menu map and loading screen map are in their respective places in the default maps and modes section, I tried the game on an emulator as well as on some friends' devices unfortunately I'm still getting the same result, I have ExternalFileDir checked and I even do a check on the main menu scene's level blueprint to check if I have external write permission and if I don't it's supposed to request it...

when I install the game it doesn't ask for any permissions what so ever it says "the app doesn't require any special permission" and when I go into settings - permission - storage it's storage permission is set to off, when I go into the game it still doesn't ask me to give permission and even if I set the permission manually from the settings menu the same still doesn't work, I tried migrating the project before but for no avail.. I have a whole game ready and it's ruined by this weird bug..

PS: if I try to build for windows saving and loading values work perfectly fine which is even more weird...

avatar image LightPS Mar 31 '19 at 06:54 PM

Naturally If you use "ExternalDir" option the game doesn't ask any permission but still saves the game inside Android -> Data -> com.xxx.xxx -> UE4Game.

Thanks for the informations. By the looks of it try : 1. Using the setting files I attached (Override some basic info like name,versions etc) 2. Recheck CreateSaveGameSlot node and DoesSaveGameExists Node 3. Try using Different Game Modes for Each Levels 4. If the problem still persists you always can contact Epic Officials through Mail.

oh yeah and one more thing, try rechecking and debug nodes like "PrintString" Just to be safe. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question