Send variables from a Blueprint to the HUD in Unreal

1. In myHUD, I made a Custom Event and gave it a memorable name, in my case DrawTexttoscreenBruno. With it selected, you can add inputs in the Details panel – I’ve got two variables and a string. The Custom Event Inputs are hooked up to a few Draw Text nodes, like in this pic….

2. Then in my Moveable Cube Blueprint (which I wanted to monitor in VR), I set the following nodes, first a Get Player controller, then a Get Hud then a Cast to BrunoHUd, which links to a DrawTextToScreen Bruno Function Call which pulls off a wire from the Cast to BrunoHUd, ‘As Bruno HUd’ node. Then I hook up Get nodes for the 3 variables that I wanted to monitor from elsewhere in my Moveable Cube Blueprint. Like this pic below.

(Also I have a Gamemode setup which sets the HUD and Player controller class.)

( My main problems seemed to be knowing what to hook up to the Cast to Object nodes, which gets more obvious if you have set up the Gamemode and defined the HUD – which does not seem to be mentioned in the docs really, and also getting my head round the slightly backwards concept that if you want to monitor something, you first set up the receiving side, afterwards setting up the sending side.)