February 20, 2020
This was writting for Unreal Engine 4.23.0
There are several types of events that can be created. Let’s look at some.
// SomeActor.h
UFUNCTION(BlueprintImplementableEvent, meta=(DisplayName = "Some Display Name"))
void SomeFunction(const FString& arg1);
Call it with:
// SomeActor.cpp
void SomeOtherFunction() {
SomeFunction("Test")
}
In the UE4 editor, create a subclass of SomeActor
. In this new subclass’s blueprint, you can override the SomeFunction
event.
// SomeActor.h
UFUNCTION(BlueprintImplementableEvent, meta=(DisplayName = "Some Display Name"))
void SomeFunction(FString& arg1);
Call it with:
// SomeActor.cpp
void SomeOtherFunction() {
SomeFunction("Test")
}
In the UE4 editor, create a subclass of SomeActor
. In this new subclass’s blueprint, you can override the SomeFunction
function.
Written by Peter Chau, a Canadian Software Engineer building AIs, APIs, UIs, and robots.