How to trigger drawing bounding boxes for all static mesh components with a key press

I created a separate BP_Button actor blueprint with no static mesh and added it to the level, along with the three BP_ObjectDetection actors with an associated static mesh.

BP_Button actor: I defined the following event graph, to generate an event OnDisplayBoundingBox. The variable IsActive is set to true when the button is pressed, and false when the button is released.

BP_ObjectDetection actor: I modified the event graph to bind to the OnDisplayBoundingBox event and wrote an event handler to trigger the bounding box.

When I run the example, it shows three messages indicating that the three BP_ObjectDetection actors have bound to the event listener.

However, when I press the key B, nothing happens.

I notice that even from the BP_Button actor, if I try to print a string from a Key B press, nothing gets displayed on the screen.

Q01: What should I do to get the BP_Button actor to correct respond to Key B pressed events?


Solution Update:

A01: I had to set Auto Receive Input to Player 0 to get BP_Button to respond to player inputs.

Now the bounding box gets displayed for all three BP_ObjectDetection actors when Key B is pressed.