-
Notifications
You must be signed in to change notification settings - Fork 0
Step 4: UI Integration
If your game already has a UI (Widget), open it. If not, create a new one.
Open your UI Blueprint class and right-click inside the Event Graph, then search for Register Indicator HUD.
Connect the Register Indicator HUD function to your widget’s Event Construct event.
Your UI is now registered with the Damage Indicator system. Next, add an Overlay to your widget.
Drag this Overlay into your Canvas Panel and give it a name. The name itself is not important, but we recommend Overlay_DamageIndicators.
Select the Overlay and go to the Anchors section in the Details panel.
Finally, adjust the size and position values as needed.
Now return to the Event Graph panel and open the widget’s Class Settings.
In the Interfaces section, add a new interface. Click Add, type DamageIndicatorInterface, and select it from the list.
This will add a new Event to your widget. You can find it under the INTERFACES section.
Double-click the Add Damage Indicator to Overlay event and connect the Overlay_DamageIndicators (which you previously added to the Canvas Panel) to this event.
At this point, the Damage Indicator component can successfully communicate with the selected UI widget.
The example UI used in this documentation is included in the plugin under:
/Plugins/DamageIndicatorPro/Content/Blueprints