Hello.
I have a custom component inherited from AActorComponent. I create it statically in actor constructor. The TickComponent function is not calling in the runtime. When debug the component , I found that the values of variables bIsActive,bTickEnable,bRegistered are all true, it was just not work.
The way I create the Component:
PlayerOperator = CreateDefaultSubobject<UPzPlayerOperator>(TEXT("PlayerOperator"));
if (PlayerOperator)
{
AddOwnedComponent(PlayerOperator);
}
The setups in component constructor:
PrimaryComponentTick.bCanEverTick = true;
PrimaryComponentTick.bStartWithTickEnabled = true;
bAutoActivate = true;
Can someone help to figure out what is going wrong? Thanks.