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
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
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How to delete some elements correctly when deleting an array loop?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
UMG RichText not appear image when packaged
How would I go about lerping the rotation instead of it snapping when turning (pls dont sue me epic)
What is the difference between Camera and CineCamera?
How to assign a value to a member of UMG's UMaterialInterface pointer type in C++?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay |
---|---|
Affects Versions | 4.6.1 |
Target Fix | 4.8 |
Created | Feb 11, 2015 |
---|---|
Resolved | Feb 19, 2015 |
Updated | Sep 16, 2019 |