A
A
Alexei No2021-02-21 21:26:10
Android
Alexei No, 2021-02-21 21:26:10

Why does the game crash when creating a save on android 11?

I am writing a small toy on Unreal Engine 4.25 using blueprints and C ++, testing it on a couple of smartphones (on the first smartphone android 8.1, on the second android 11). On the first smartphone (8.1) everything works fine - the UE4Game folder is created, in which the save file and logs are stored. On the second smartphone (11), the game crashes when trying to create a save file (I think so). the game doesn't create the UE4Game folder and I can't see the logs. The latest version of the game (without saves) worked fine on both devices, so I think that's the problem. On the Internet, I did not find any information on this problem. Thank you in advance for your help, and I am also attaching the code for creating a save in the game:

void AMyGameModeBase::CheckSave()
 {
     if (UGameplayStatics::DoesSaveGameExist(TEXT("save_01"), 0) == true)
     {
         GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Savefile already created"));
         return;
     }
     UMySaveGame* MySave = Cast<UMySaveGame>(UGameplayStatics::CreateSaveGameObject(UMySaveGame::StaticClass()));
     UGameplayStatics::SaveGameToSlot(MySave, TEXT("save_01"), 0);
     GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Savefile created"));
 }


Addition.
In general, using the permission MANAGE_EXTERNAL_STORAGE (Allow to manage all files), I made sure that the saves worked. But I would like to know how to do without this permission.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexei No, 2021-05-09
@alien2023

After reading foreign forums, I came to the conclusion that Google services are to blame for everything, because. On a smartphone without Google services (on Android 12) everything works fine. That is, until Google "approves" you will have to issue the MANAGE_EXTERNAL_STORAGE permission.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question