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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Add a widget to a widget


What I need is really simple, but I can't seem to make it work. I just want to add a widget to a widget. Simple as that. I checked A LOT of tutorials and threads but none seem to help. Here are the steps I took:

  • Created 2 widget blueprints. One main and one with just a button and some text.

  • In my player controller, I created the main widget.

  • In my player controller, I added the button widget as a child to main widget

  • In my player controller, I added the main widget to viewport.

Result: Only the main widget appear. I tried added to viewport before adding the child. Tried in level blueprint. Tried to add child inside main widget.

It should be super simple, but nothing works.

Here is my playerController blueprint: alt text

Product Version: UE 4.21
addwidget.jpg (293.3 kB)
more ▼

asked Jan 08 '19 at 09:53 PM in Blueprint Scripting

avatar image

107 11 17 27

avatar image dabs863 Jan 08 '19 at 10:05 PM

what is the item list holding like quest or what? theres a couple ways to do what your trying to achieve just depends on what it is on which route to go !

avatar image Elggetto Jan 08 '19 at 10:15 PM

Well the final goal is: have a custom blueprint pawn VIEW(just a null with a camera). For each VIEW in the level, create a button in a list in the main menu. So everytime I add VIEW to the level, a new button gets created. When I press on the button, I posess the corresponding VIEW.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

well inside player controller you only wanna add the HUD nothing else .. so everything on then 1 delete Inside the hud click the canvaspanel and mark is variable 2nd add a empty box horizontal or vertical scroll whatever you want the itemlist to be contained in (Mark is variable as well)and then go to your item list make sure it doesnt have a panel like delete it and do a size box and make it the size you want and then inside the pawn cast to your player controller and add the child to the hud inside that code..

[1]: /storage/temp/264672-adding-to-hud.png

inside-hud.png (90.0 kB)
adding-to-hud.png (71.1 kB)
more ▼

answered Jan 08 '19 at 10:40 PM

avatar image

156 1 3 6

avatar image Elggetto Jan 08 '19 at 11:41 PM

Not sure I understand. How can I cast my widget with playerController as my object. It doesn't inherit from it?

avatar image dabs863 Jan 09 '19 at 12:34 AM

did you look at the screenshots?

avatar image dabs863 Jan 09 '19 at 01:12 AM

ok just so we can get this working for you and staying inside the player controller mark your panel is variable in your main hud and then look at this screen shot dont worry about all the add to viewport hook ups lol did it on the fly only one needs to go to add to viewport

[1]: /storage/temp/264669-untitled.png

untitled.png (48.2 kB)
avatar image Elggetto Jan 09 '19 at 03:27 PM

Okay it's finally working! My error wat that I did not put the panel as a variable in my main HUD. Thank you.

avatar image dabs863 Jan 09 '19 at 04:11 PM

your welcome!!

avatar image dabs863 Jan 09 '19 at 01:19 AM

should be easier to read

untitled.png (96.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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