Widget is Created but it didn't show up

Hello, i’m really new to UE and i hope someone can give me an explanation that can even be understood by a beginner like me. Thanks :slight_smile:
i tried to make a MainMenu (Widget) and try to call it on the BeginPlay event on my PinballGameMode, and when i hit play on UE editor the MainMenuWidget is Created but it didn’t show up (i know it there because there is a mouse cursor and i able to move my mouse cursor, which cursor should not be there when the game is running), however its work when i call it on another event.,

Can you show how you add the widget to the viewport. Also, can you show the widget hierarchy itself?

(i know it there because there is a
mouse cursor and i able to move my
mouse cursor, which cursor should not
be there when the game is running)

You sure? Having a cursor on the screen is not a good indication that you have a widget in the background. You can see you cursor with no widgets in the project just fine.

You sure? Having a cursor on the screen is not a good indication that you have a widget in the background.
now I’m not sure hahaha


Btw, this is how i adding main menu widget to custom event (CreateMainMenu)


andthen calling it on BeginPlay Event. (if you see that i exec the spawn ball it because i want to see if my main menu widget work/not when i exec the EndGame Event later on, and it work. Normally, the ball would not spawn if i didn’t hit Play Button on the Main Menu Widget)


the widget it self is just like this

So you’re saying that Pinball Game Mode Begin Play does not get called? The rest looks fine.

idk if Begin Play on Pinball Game Mode is called or not.

what i know is, the ball is called when Begin Play on Pinball Game Mode exec Spawn Ball through Create Main Menu. So, i assume that Begin Play is work/called. right?

and also, when I press “alt + p” in the UE editor, I can move my cursor, which i should not be able to move it. except i exec Create Main Menu on Begin Play. that’s why i assume Create Main Menu is called/work, but Main Menu Widget didn’t show up


and for your information, the only reason why i exec Spawn Ball event on Begin Play it’s because i want to see if Create Main Menu work or not when i ran out the ball remaining variables, which mean game is over/ End Game event is called.

i’m really sorry if my english is bad, i hope you or anyone else could understand it hehe and also thanks for your response

idk if Begin Play on Pinball Game Mode
is called or not.

Print String is your best friend. Drop it at junctions where data flows and see if it shows up on screen. For starters, place it between Begin Play & Create Main Menu event. Does it print?

Your English is absolutely fine and the rest of your code looks like it should work, too!

Perhaps there is something in SpawnBall that removes widgets from the viewport?

Can you also confirm that the you overrode the GameMode correctly, I see you use a custom one and a custom controller - if not assigned properly then the whole thing will not work, for sure.


And if you want to see your cursor (with no widgets), you can Get Player ControllerSet Show Mouse Cursor

On the other hand, widgets override cursor settings by default, even if the cursor is hidden and you do hover over a widget, the cursor will show up so this may indicate that the widget is present but not showing.

And one more thing, can you select the root of the widget and ensure it’s not set to Hidden / Collapsed?

Perhaps there is something in SpawnBall that removes widgets from the viewport?
Hey, i fixed it, thanks for your advice :slight_smile: the problem is Create Player HUD that i exec on Begin Play in my Pinball Player Controller hahaha it remove all widgets and So, my Main Menu Widget that i created on Pinball Game Mode is removed.