- Create or open any project
- Create a new Widget Blueprint named "Parent"
- Right click in the Content Browser then select User Interface > Widget Blueprint then select User Widget
- Name the widget "Parent"
- Open the widget by double clicking
- Add a Named Slot to the widget
- In the widget Designer search the Palette tab for a Named Slot then drag it to the Hierarchy tab
- Compile, save, and close the widget
- Create a new Widget Blueprint derived from Parent widget then name it "Child1"
- Right click in the Content Browser then select User Interface > Widget Blueprint then expand the All Classes drop down and search for and select Parent
- Name the widget "Child1"
- Open the widget by double clicking
- Add a Named Slot to the widget's Hierarchy under the parent's Named Slot
- In the widget Designer search the Palette tab for a Named Slot then drag it on to the Named Slot that is already in the Hierarchy tab
- Compile, save, and close the widget
- Create a new Widget Blueprint named "Child2"
- Right click in the Content Browser then select User Interface > Widget Blueprint then expand the All Classes drop down and search for and select Child1
- Name the widget "Child2"
- Open the widget by double clicking
- Add a Button(or any component) to the widget's Hierarchy under the parent's Named Slot
- In the widget Designer search the Palette tab for a Button then drag it on to the Named Slot that is already in the Hierarchy tab
- Select the Button in the Hierarchy then in the Details panel enable Is Variable
- In the Graph Editor get a reference of the Button by ctrl + left click dragging the Button variable into the graph
- Drag off the Button's output pin then search for and create an Is Valid node(F IsValid, not ? IsValid)
- Drag off of the Parent: Tick node's output execution pin and create a Print String node
- Connect the Is Valid node to the In String input pin of the Print String node
- Compile, save, and close the widget
- Open the Level Blueprint
- Select the Blueprint Icon beneath the Main Menu Bar then select Open Level Blueprint
- Drag off the output execution pin of Event BeginPlay then create a Create Widget node
- Set the Class to Child2
- Set the Owning Player to the Player Controller
- Right clicking in the graph then search for and select Get Player Controller
- Connect the Return Value to the Owning Player input pin
- Drag off the Create Widget node's Return Value output pin then create an Add to Viewport node
- Connect the Create Widget node's output execution pin to the Add to Viewport node's input execution pin
- Compile, save, and close the blueprint
- Play in Editor
Expected Results:
The Button is considered valid and True is printed to the screen each tick.
Actual Results:
The Button is visible, interactable, but is considered invalid with False being printed to the screen each tick.