Hi, why when I replicate the variables on the Header files with the UPROPERTY(Replicated) macro, the compiler gives to me “unresolved external symbol”, and with UFUNCTION(Reliable, Server, WithValidation) that already exists, while it’s nowhere in the .cpp file?
I was wrong to write. The problem is with UPROEPRTY(Replicated), but it gives error with this UFUNCTION too.
Solved. I had to make
bool AUACharacter::ServerLookUpYaw_Validate()
{
return true;
}
and
void AUACharacter::ServerLookUpYaw_Implementation()
{
}
and for the Variables:
#include "UnrealNetwork.h"
void AUACharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty> & OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AUACharacter, Pitch);
DOREPLIFETIME(AUACharacter, Yaw);
}