So I’m trying to use a static function so that i can add it to a function library via c++ my code is as follows:
in the header file:
under the public section:
static bool CanSeeActor(const UWorld* World, FVector Location, const AActor* TargetActor, TArray IgnoreActors = TArray());
in in the cpp file:
static bool CanSeeActor(const UWorld* World, FVector Location, const AActor* TargetActor, TArray IgnoreActors = TArray())
{
my implementation
}
when i went to compile i was getting a linker error but I am not sure how to resolve it:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “public: static bool __cdecl UDodgeballFunctionLibrary::CanSeeActor(class UWorld const *,struct FVector,class AActor const *,class TArray<class AActor const *,class TSizedDefaultAllocator<32> >)” (?CanSeeActor@UDodgeballFunctionLibrary@@SA_NPEBVUWorld@@UFVector@@PEBVAActor@@anonymous_user_e71e0d8a1?$TArray@PEBVAActor@@anonymous_user_e71e0d8a1?$TSizedDefaultAllocator@$0CA@@@@@@Z) referenced in function “public: bool __cdecl AEnemyCharacter::LookAtActor(class AActor *)” (?LookAtActor@AEnemyCharacter@@QEAA_NPEAVAActor@@@Z) Dodgeball C:\Users\OneDrive\Desktop\C++ Projects\DodgeballUE4\Dodgeball\Intermediate\ProjectFiles\EnemyCharacter.cpp.obj 1
Am i missing something?