Getting started
Explanation of how to implement the system to an object
Open your object that you want to bind an event to and add the EasyEventManagerInterface.
Recompile your Blueprint to be able to find the functions in the Right-Click Menu;
or implement it through the Interface panel on the left side:
Now you are ready to bind an event by using either
BindEvent()
orBindEventTag()
You can call BindEvent() or UnbindEvent() from anywhere! Implement the
OnEventCalled()
orOnEventTagCalled()
function from the Interface
And that's it! Now you can use CallEvent()
or CallEventTag()
anywhere you want, easy right?

C++ Implementation
Implement the
EasyEventManagerInterface
to your c++ class
Header file:
public IEasyEventManagerInterface
Example:
class AMyActor : public AActor, public IEasyEventManagerInterface
{
}
Now you are ready to bind an event by using either
BindEvent()
orBindEventTag()
Cpp file:
// For Tag usage
#include "GameplayTagsManager.h"
void AMyActor::BeginPlay()
{
UEasyEventManagerLibrary::BindEvent(this, FName("MyEvent"), Object);
// or for tags
UEasyEventManagerLibrary::BindEventTag(this, UGameplayTagsManager::Get().RequestGameplayTag(FName("MyEventTag"), true), Object);
// call parent function
Super::BeginPlay();
}
Implement the
OnEventCalled()
orOnEventTagCalled()
function from the Interface
Header file:
virtual void OnEventCalled_Implementation(FName Event, const FString& Message, UObject* Payload);
virtual void OnEventTagCalled_Implementation(FGameplayTag EventTag, const FString& Message, UObject* Payload);
Cpp file:
void AMyActor::OnEventCalled_Implementation(FName Event, const FString& Message, UObject* Payload)
{
//some code
}
void AMyActor::OnEventTagCalled_Implementation(FGameplayTag EventTag, const FString& Message, UObject* Payload)
{
//some code
}
And that's it! Now you can use
CallEvent()
orCallEventTag()
anywhere you want, easy right?
Last updated