Accessing Subclasses of a class in C++
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.
EDIT: Just a note, VS is telling me that I can't use AMNPickup because: "type name is not allowed"
All UObject derrived classes have a StaticClass() which returns their UClass*. Any UObject can also tell you if it is a subclass of another UObject type: Thing->IsA(AActor::StaticClass()) would == true for example.
answered Oct 14 '14 at 11:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here