Blueprint: Menu not showing

Hey guys,

So I’ve replicated the ‘Multiplayer Shootout’ example where it comes to the menu.
The menu works when you start the game, you can host a game and you can join a game, all things are good there.

When you’ve entered a game, there’s an ingame menu, and that works as well, partly.
The problem is when you press the ‘leave game’ button…
When pressed on that button, the level closes and the main_menu level opens. And this is where something goes wrong but I don’t know exactly what. So here’s a screen capture of where I think the problem is.

For some reason the ‘Main Menu’ widget connected to the ‘isValid’ node, seems to be valid (checked) all the when leaving the game. So I think I’ve missed something to destroy the Widget earlier or something, I don’t know. But I’m stuck with this, have been figuring out what the problem is for weeks… I’ve gone over the Shootout example a million times, I’m getting frustrated.

I hope someone know what the problem is, or at least point me in the right direction.
I’m also willing to upload the project so that someone can take a look at the total package if this did not provide enough information.

Thanks in advance.

Hi

Have you tried other methods to do this?

There is a very small amount of code there to work out what could be wrong.

Because if all of those nodes are correct, then this may not be the issue. Have you dug deeper. Put some break points or print screen in to see where the error occurs, If so can you post them too please.

Hi Serellyn,

The code sample you are looking at looks fine. Basically, your menus are created and managed by the Gameinstance. The gameinstance creates at game launch and ends on shut down. There is only ever 1 gameinstance and in that content example there should be a derived gameinstance blueprint.

The behavior you see is expected to be IsValid, because there was never a command to destroy nor was any parent of the widget garbage collected.

What actually happens? Do you get a black screen? Try adding the “-log” to the standalone command line to spit out more data.

Thank you for your reply.

I indeed just get a black screen while trying to return to the main menu.
I’ve added the log command as you said (I learn something every day), and it looks pretty normal except for the following two lines I think:

LogGameMode: Warning - PATHS NOT DEFINES or NO PLAYERSTART with positive rating

LogScript: Warning: DestroySessionsCallback - Invalid player state

Now I don’t know if this causes the problem, but these warnings appear when I get the black screen. So this might be it? I just don’t really understand yet what they say or how to fix it. I’m new to all this so sorry for that.

Could this be causing the problem?

Did you ever figure this out? I’m also getting a black screen only it’s black as soon as the game starts.

Edit: I didn’t set my custom GameInstance class in Project settings > maps and modes.

I still do have the problem, good to hear you solved yours :slight_smile:

Did you figure it out? This problem has pained me for couple of days now. I added empty SET nodes after remove from parent nodes in Transition to State macro after so when widget gets removed their variable gets invalid.

https://dl.dropboxusercontent.com/u/26177594/ShareX/2015/07/2015-07-26_04-03-22.png

But it didn’t fix the issue. :confused:

This problem also appears in full Multiplayer Shootout example that’s downloadable from launcher. So whoever made it in Epic never tried to quit to menu from game?

Edit: I tried 4.7 version of this example and this bug doesn’t exist in that version. So it could be another 4.8 bug.

I’m in your boat now. Menu loads fine at first, but goes black when trying to return to it later. It happens in both my own project and the Multiplayer Shootout. If I find a solution I’ll be sure to post back here.

Also, have you noticed that if you click in a black area on the menu that you lose the cursor? Also, what kind of graphics card do you have? Mine is a Nvidia Quadro FX 1800 which I know is not up to par for the engine. I’m curious if you have one that is equally bad.

You can fix cursor disappearing by using SET Show Mouse Cursor node. Use it in player controller after event Begin Play if you want to see mouse cursor everywhere in game.

I already have the mouse cursor set to show. It is always on since the bool is set to true in my C++ Player controller. It works fine until I click in the black area and then it disappears.

I just found out that widgets that get removed still stay in memory so it was pointless to add those SET nodes.

It has to be 4.8 bug since this setup works fine in 4.7

That could be the problem. Have you reported this behavior as a bug yet?

Do you mean the part about widgets? I found out about it here: How to destroy UMG widget? - UI - Unreal Engine Forums
I’m sure that it’s intended behavior.

Ah you’re right, I should improve my reading skills :wink:
Thanks for the link.

Hey Kochab, did you find a fix yet? We’re experiencing exactly the same, my cursor also disappears while I have it set to UIonly as the Multiplayer Shootout example. I’m on a nVidia GTX770, but I don’t think that’s the problem because the MP Shootout example does work for me.

Interesting. For me, the same thing happens in the Multiplayer Shootout menu. I did find a fix for the cursor disappearing. Wrap the entire menu with a border and make sure it covers the entire screen. I’m guessing this is also a 4.8 bug.

I’m having the exact same problem. I tried replicating how they handled menus in Multiplayer Shootout, hoping I could fix the bug, but still no luck.
At the moment my workaround is just to bring up the main menu over the existing level (instead of loading the menu level). This works, but has the drawback that the server is still open until the game is quit altogether or a new map is hosted.

I hope you can fix the problem rather sooner than later, I gave up atm. Let me know when you do please :slight_smile:

Btw I got a response from developer about this at forums: