Open Level not working on mobile launch

Hey,
I am using Unreal Engine 4 with a custom gamemode instance of a c++ gamemode class, wich calls to GameState c++ class, to open a specific level. This Function -
However if i build on android and try to travel to the next level it loads my current level again and my player character spawns at the player start. When i start in the editor everything works fine.
Here is another post with maybe the same problem.
In my GameState Constructor i print a message to the screen. But if i start the game (level) it prints 2 lines.
Is it possible that i need another function to load the next level on mobile?

Hey Yangus,

Could you post the full code that you are using to execute your travel to the next level?

Does this issue also occur if you play the game on windows (i.e. package it out for Win64)?

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

I’ve encountered the same issue ! … works fine in editor or when I package the game … loads same level when launched on mobile. But, I had a menu level, loading level and playing level. If I launch each individual level once, the level transition works. Otherwise it loads the previous level again

The reason is because when you launch the game it only cooks the default map. You can try adding the map to the Additional Asset Directories to Cook section of Edit->Project Settings->Packaging, or just test by packaging the game in order to prevent this from happening.

Have a great day

Checking Cook everything in the project content directory under Packaging settings solved the issue for me.

2 Likes

Cook check also worked for me, andriod.

1 Like