Description

When a project with a C++ custom game instance is packaged for Android, the game mode is initialized twice from different paths.

Device log files attached

Steps to Reproduce

1. Open UE4Editor
2. Create a code based project
3. Add Code to Project -> New Game Mode
4. In the header file add the following code to the generated body:

         UMyGameInstance(const FObjectInitializer & PCIP);

5. In the source file add the following construtor:

UMyGameInstance::UMyGameInstance(const FObjectInitializer & PCIP)
 : Super(PCIP)
 {
    UE_LOG(LogTemp, Log, TEXT("Initializing InventoryDB from GameInstance path '%s'"), *GetPathName());
 }

6. Compile the project and open
7. Package the project for Android
8. Launch the project on the Android device

Result:
Device logs shows the line from the constructor being generated twice

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Non-Issue
ComponentUE - Gameplay
Affects Versions4.6.1
Target Fix4.8
CreatedFeb 11, 2015
ResolvedFeb 19, 2015
UpdatedSep 16, 2019
View Jira Issue