How can I properly override C++ Tick event in blueprint?

I’ve created a character in C++ inheriting from ACharacter, and I’ve overridden the virtual Tick function.

virtual void Tick(float DeltaSeconds) override;

I then created a blueprint inheriting from my character class, and in the event graph created an “Event Tick” node which is connected to a “Parent: Tick” node created by right clicking on the event.

However, the Event Tick node won’t execute (wire turns gray during play).

I’ve tried using the macro UFUNCTION(BlueprintImplementableEvent), but with the same result.

Commenting out the C++ Tick function makes the blueprint Event Tick node work again.

I’ve read that it may have to do with the fact that Tick doesn’t return anything, in which case, how can I properly override a void function in blueprint?

Thanks!

I discovered a workaround.

I gave the blueprint the Tick function, and had a C++ function acting as Tick be UFUNCTION(BlueprintCallable), and then I called it in the blueprint tick.

You probably forgot to call Super::Tick(DeltaSeconds) in your parent (c++) class from your overriding Tick method.

1 Like