How do I fetch the Parent Class of an Object?

Hey everyone, I’m a student learning Unreal, and I wanted to know how you fetch an object’s parent class using blueprints.

I want to check if an actor of mine is colliding with a character whose parent is XYZ, so can someone please tell me how to achieve that?

I don’t think there is a blueprint node to “get” the parent class. But if you know the parent class that you want to check against, the Class Is Child Of node should do the trick.

Can’t you just Cast to the parent class?

Hey that worked! Thanks a lot!

Hello there. Stormrage’s suggestion worked for me, but can you elaborate on what you were saying please? If there’s a second way I’d like to learn it too haha.

Internet is worth because of people like you

2 Likes

You can also make a variable for just about anything. Depending on what you want to do, sometimes this is more practical than casting (which is best used for collision-based events), and is arguably more performant than getting all actors of class, and filtering by does implement interface. But it is still a hard reference.