Hi all… Not sure what’s happening here but I’ve created an inherited class from UActorComponent.
In the constructor, I’ve set
PrimaryComponentTick.bCanEverTick = true;
Overridden in the header file
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
BeginPlay() called super and even called RegisterComponent()
Originally was not calling RegisterComponent() at all, but read in another post where that helped someone else. But, didn’t affect my problem at all. I’ve tried RegisterComponent() both in the constructor AND here in begin play.
void UCombatComponent::BeginPlay( )
TickComponent definition in CPP
void UCombatComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, FString(TEXT(“UCombatComponent::TickComponent”)));
I have another project where I’m doing the same thing and it works there, but I am stumped at why it’s not working here.
In my constructor, I’ve set a debug message to print, much like what is here in the TickComponent. The constructor is printing it out, so I know the class is being used and initialized.
I’ve deleted all generated files, deleted the visual studio solution file, regenerated visual studio project files, re-compiled, re-ran app… Nothing.
I’m really up against a time crunch and all here. Hoping someone has some kind knowledge that can help… It will be so greatly appreciated!