So I have made a simple game prototype with Main Menu and a HUD, which works normally when playing in Unreal Engine. However, after packaging/building the game for Windows 64bit, the HUD overlaps on top of the Main Menu. The Main Menu still works but it is annoying to see the HUD.
Could you provide some screenshots so I can get an idea of what you are looking at while in editor versus on the device?
Are you using UMG or are you calling things directly to the HUD via blueprints?
Thanks for replying.
I am attaching some screenshots of my project. The first is a comparison of the Main Menus as they appear, when packaged (top) - which has HUD overlapping on top (The heart, the zero and the word “Go!”),
and then (bottom) while playing in viewport/new editor window (PIE) has the Main Menu clean and how it is supposed to look like.
I have also attached a screen showing the HUD in-game and at the very end about the HUD which I’m pretty sure I have made with UMG, but wasn’t too sure.
A couple of questions to help find the source of the issue.
- How are you calling the Widget Blueprint to the Viewport/Screen?
- Have you set the default game start up level to the correct level?
Let me know if you come across any new information or have additional questions.
I have a Main Menu map [MenuMap] and a game/level [Level1-1] map. Which looks correct to me.
Perhaps the error is in how I’m calling them to the screen, either the HUD widget or the Main Menu widget.
I am calling the HUD from the playable Character Blueprint like so:
instead the Main menu is called from the MenuMap level blueprint. Then I made the main menu widget as hidden on clicking the play button/opening the level map.
Not sure if I have explained it all too well…
Finally found it! I hadn’t seen that there was an option to set Z-Order when adding the widgets to Viewport (as it needs to be expanded by clicking the little arrow). I only knew about it when creating the smaller elements, such as buttons, within the same widget.
So I changed the ZOrders for the Main Menu and the HUD. Packaged it and it works
Here’s what it looks like.
Good find! I have marked this question in my favorites since the issue and answer I bet is a common problem and solution.
Another solution, instead of changing the zorder, you can call the HUD widget from the level blueprint. I had the same issue where I used the beginplay event from the playable character blueprint, which creates the hud widget when the game starts. If you move it to the level blueprint, you can guarantee that the widget won’t be created until that level starts.
After changing the zorder, if you adjust the opacity on your background you will see that the hud is still there, which may or may not cause underlying issues in the future.