Add The Widget
- Open the Widget Blueprint where the tree should appear.
- Go to the Designer tab.
- In the Palette, look under Views and add the custom tree view widget to your layout.
- Select the tree view in the Hierarchy.
- If you want to call its Blueprint functions later, enable Is Variable in the Details panel.
Add Tree Nodes
- With the tree selected, find Tree Nodes in Details.
- Add one entry for each row you want in the tree.
- Set Node Name for each row.
- Set Parent ID to 0 for root rows.
- For a child row, set Parent ID to the parent row position, counting from 1.
- Compile the widget, then preview it.
Example: If row 1 is
Weapons, children under Weapons use Parent ID = 1. If row 4 is Consumables, children under Consumables use Parent ID = 4.
Important Ordering Rule
Always place a parent row before its children in the Tree Nodes array. The widget builds the tree from top to bottom, so a child needs its parent to already exist.