How to do it...

  1. Right-click in your Content Browser (or click on Add New) and select User Interface | Widget Blueprint, as shown in the following screenshot. This will add an editable widget blueprint to your project:
  1. Double-click on your Widget Blueprint to edit it.
  2. Add a button to the interface by dragging it from the palette on the left:
  1. Scroll down the Details panel for your button until you find the Events subsection.
  2. Click on the + icon beside any event that you'd like to handle:
  1. Connect the event that appears in Blueprints to ...

Get Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.