x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 :) 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.,

Product Version: UE 4.20
Tags:
more ▼

asked Oct 01 '18 at 02:30 PM in Blueprint Scripting

avatar image

MamangAran
1 1 2

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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

Hey, i fixed it, thanks for your advice :) 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.
more ▼

answered Oct 02 '18 at 01:36 PM

avatar image

MamangAran
1 1 2

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Oct 01 '18 at 02:36 PM

avatar image

Everynone
11.3k 68 22 48

avatar image MamangAran Oct 01 '18 at 05:10 PM

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) alt text


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) alt text


the widget it self is just like this alt text

avatar image Everynone Oct 01 '18 at 06:47 PM

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

avatar image MamangAran Oct 02 '18 at 04:59 AM

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

avatar image Everynone Oct 02 '18 at 07:08 AM

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 Controller -> Set 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?

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question