I am having a problem in the definition in the .cpp in UE5.2.
If I put this in the .h
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
And If I put this in the .cpp I get these errors.
From Rider:
void AOurActor::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps) const { // ERROR Qualifier 'const' is only allowed on non-static member functions
Super::GetLifetimeReplicatedProps(OutLifetimeProps); // Cannot resolve symbol 'OutLifetimeProps'
DOREPLIFETIME(AOurActor,ReplicatedVariable); // Cannot resolve symbol 'OutLifetimeProps'
}
Now, if the signature and the definition are in the .h, it works correctly.
I don’t mind leaving it in the .h even though it’s bad practice.
The question is
What happens to the .cpp definition?