I have been trying to implement multiple different uses of UGameplayStatics but I consistently am met with the error of “UGameplayStatics::GetAllActorsOfClass is inaccessible”. Based on documentation and everyone else, this clearly should not be the case.
I have been trying to use multiple different #include for referencing UGameplayStatics but none of them seem to make a change.
Sample Code:
#include "MyAIController.h"
#include "Kismet/GameplayStatics.h"
void AMyAIController::Possess(APawn* Pawn)
{
Super::Possess(Pawn);
TArray<AActor*> FoundActors;
UGameplayStatics::GetAllActorsOfClass(GetWorld(), AAITargetPoint::StaticClass(), FoundActors);
}
Am i referencing UGameplayStatics incorrectly or is there a bigger issue i should be looking for?