I’ve implemented a BlueprintImplementableEvent on my custom actor.
UFUNCTION(BlueprintImplementableEvent, Category = AOE)
void OnInitialize(); //virtual doesn't work either
I call it like this
this->OnInitialize(); //doesn't work with "this" either
It works perfectly every time in the editor & mobile preview. But when I run it on my device it doesn’t get called?
I put a debug message before I call it like this
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("Initialize"));
this->OnInitialize();
And it displays in the editor and on the device.
I also added a “Print String” node to the blueprint event and disconnected the rest for testing.
This message appears in the editor as expected but does not appear on the device.
I have no idea why the event wont get called on mobile?
Edit: I should also add that I’ve implemented other BlueprintImplementableEvents in another class and they work just fine. And I know the actor in question here is working as I can see it in-game and it’s effects (it’s an area of effect which has a static mesh and damages enemies OnTick)