I have created a C++ class inheriting fom AActor (and annotated with the UCLASS() macro). Everything compiles fine, but if I add a custom member funtion (with no UE macro annotations) I get an “out-of-line declaration” error for its implementation (this is on XCode). The declaration in the cpp file is definitely correct, and I don’t have any idea what might be going wrong.
So, the header looks like
UCLASS()
class AMyActor : public AActor
{
GENERATED_UCLASS_BODY()
float GetDateNumber(int16 year, int16 month, int16 day);
};
and the implemenation
AMyActor::AMyActor(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
}
float AMyActor::GetDateNumber(int year, int month, int day)
{
return 1.0f;
}
Any suggestions?