Hello All,
I just had a quick question because I’m having a hard time finding documentation that I can really understand on this issue.
I’m trying to get the class of an actor and compare it to one of my custom classes (to determine whether the actor is an instance of my class of interest. The problem here is, the compiler complains about this (what I have below) and I don’t really know the syntax for this or why it will or will not work. Additionally, I would actually like to make my statement check “if ActorClass == (AnySubclassOf)AMNPickup” but I’m having a bit of a hard time figuring out how to do this. I’d really appreciate any help here. Even links to documentation that I may have overlooked would be helpful.
Thanks
void AMNCharacter::CheckForInteractables(){
TArray<AActor*> ThingsImTouching;
GetOverlappingActors(ThingsImTouching);
for (AActor* Thing : ThingsImTouching)
{
if (Thing->GetActorClass() == AMNPickup)
{
}
}
}
EDIT: Just a note, VS is telling me that I can’t use AMNPickup because: “type name is not allowed”