I have a UActorComponent, here is my constructor
PrimaryComponentTick.bCanEverTick = false;
PrimaryComponentTick.bStartWithTickEnabled = true;
PrimaryComponentTick.TickGroup = TG_PrePhysics;
bAutoRegister = true;
bWantsInitializeComponent = true;
bAutoActivate = true;
But TickComponent not got called, I add everything I read in the AnswerHUB.
The component is attached to a staticmesh (I set to moveable too), the Component is not a SceneComponent.
Any ideas? I try all in my knowledge.
I think you shoud change:
PrimaryComponentTick.bCanEverTick = true;
I had a similar problem but in my case, In BeginPlay() method, I forgot to call Super::BeginPlay() and Tick Stoped working.
In my case this was caused by a Hot-reload issue.
Solution was to recreate a variable
BeginPlay was called. If I added the component via blueprint it worked, but
Tick method was not called if I add the component via c++ .
I created duplicated the variable name and creation with
2 and it worked
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Input)
PlayerAimingComponent2 = CreateDefaultSubobject<UPlayerAimingComponent>(TEXT("PlayerAimingComponent2"));
double-check that BeginPlay is called.