I have a C++ class and a Blueprint Instance.
Parent Tick is not called in Blueprint Class, but C++ Class is called anyway.
This situation only occurs in Blueprint with C++ parent, but it does not happen in Blueprint with Blueprint parent.
How do I disable parent tick?
and set bParentTickDisabled in blueprint manually.
Another option would be
//header
UFUNCTION(BlueprintNativeEvent)
void MyTick(float DeltaTime);
//cpp
void AMyActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
MyTick(DeltaTime);
}
void AMyActor::MyTick_Implementation(float DeltaTime)
{
//some parent tick code, that can be overriden in childs(including bp-childs) just like you expect it
}
hi there,
In child blueprints, if you want to make a call to event tick from parent, select event tick, right click and select “add call to parent function”. Same applies to “begin play” if needed.
That should work.
That is literally the exact opposite of what the original posted asked about.
It turns out, many blueprint events are actually “hooks” more than “direct function overrides.” Thus, you can’t “override” functions in the same way in blueprint, that you can in C++. (It is possible to arrange things so that you do, in fact, have the ability to override in blueprint, but Tick isn’t one of those.)
If you don’t want parent Tick called, then either override in C++, or turn off actor ticking entirely for the actor. If you still need to do occasional work in the blueprint, perhaps arrange for a timer to call into the blueprint, inside Event Begin Play or somesuch.