Quick Start

With the following steps, we can quickly define and use an event.

Define an Event

To create an event, we need to define a subclass based on UDidaEvent, which can be a C++ class or a blueprint class.

quick-declare-event

Broadcast the Event

In the blueprint, you can call the DidaInvokeEvent node to trigger the event.

quick-invoke-event

Listen to the Event

In an Actor, you can use DidaEventListenerComponent to listen for events.

quick-create-listener

Set the Component’s properties to configure the events you want to listen to.

quick-set-listener-event

Use the Delegate on the Component to define the logic that will run when the event is received.

quick-set-listener-callback

Congratulations

🎉 Following the steps above, we have implemented a feature:

When pressing a key, the character object outputs a log message.