Something very strange is happening. This compiles just fine:
in DarwinCharacter.h :
public:
UFUNCTION(Server, Reliable, WithValidation)
void ServerSetStealthX(bool stealth_on);
in DarwinCharacter.cpp :
void ADarwinCharacter::ServerSetStealthX_Implementation(bool stealth_on)
{
bStealthOn = stealth_on;
}
bool ADarwinCharacter::ServerSetStealthX_Validate(bool stealth_on)
{
return true;
}
But this does not (the only difference is the X in the name of the function) :
in DarwinCharacter.h
public:
UFUNCTION(Server, Reliable, WithValidation)
void ServerSetStealth(bool stealth_on);
in DarwinCharacter.cpp :
void ADarwinCharacter::ServerSetStealth_Implementation(bool stealth_on)
{
bStealthOn = stealth_on;
}
bool ADarwinCharacter::ServerSetStealth_Validate(bool stealth_on)
{
return true;
}
I get these errors everytime DarwinCharacter.h is included somewhere:
DarwinCharacter.h(15): error C2039: 'ServerSetStealth_Validate': is not a member of 'ADarwinCharacter'
DarwinCharacter.h(13): note: see declaration of 'ADarwinCharacter'
DarwinCharacter.h(15): error C2039: 'ServerSetStealth_Implementation': is not a member of 'ADarwinCharacter'
DarwinCharacter.h(13): note: see declaration of 'ADarwinCharacter'
Lines 13 and 15 are :
class ADarwinCharacter : public ACharacter
{
GENERATED_BODY()
I tried deleting everything in Build, Binary, Intermediate, DerivedDataCache, Saved, also deleting Darwin.VC.db, Darwin.sln and regenerating project files, and rebuilding (clean and rebuild all) the solution and still the exact same error. It compiles with the X and not without. Changing just those 3 characters makes it not compile. There is no other function with that name either. In the entire solution.
I am using the latest (Merging final 4.12.5 release a208e88) engine source.
My visual studio info is
Microsoft Visual Studio Community 2015
Version 14.0.25123.0 D14REL
Visual C++ 2015 00322-20000-00000-AA079
I’m stumped.