Download

Adding an Actor Class to a struct in C++

I am working on a Quest System in C++ for a project. I have the DataTable set with the Structs, but I need to know how to call an Actor Class inside the struct in my code. The blue outline is where I need the help. In Editor, I can select Actor then Class Reference. How would I get the actor in C++? I have been looking at the Struct and AActor docs but cant find the solution.

Here is my code that I am using

USTRUCT(BlueprintType)
struct FKill
{
GENERATED_BODY()

UPROPERTY(EditAnywhere)
AActor* KillTarget->GetClass();

UPROPERTY(EditAnywhere)
uint8 KillCount;
};

Are you simply looking to get access to the AActor in your struct via C++ code? Or are you also asking how you assign an actor to the KillTarget property in your struct?