Get all child classes of a parent class

Hello,

I got a parent bp with multiple child bps. I would like to know how I can get all the child bps when none of them spawned. I can’t do it with a list of all the child bps since the amount of them is dynamic.
I already found some answers which say I should create my own c++ blueprint widget, but they are all outdated and I don’t know any c++. :frowning:

This is the exact same question from 2015:
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/43078-get-all-children-classes-of-a-bp-in-a-function-library

Thank you very much :slight_smile:

Hello JanSO,

I found this problem interesting so I played a bit with it. Created a actor class as parent and then made two children. Used line trace to get the results, just as a proof of concept.

Placed all three in the world. You mentioned you will have them created dynamically so I created a Spawn Node too. For the sake of simplicity I’m spawning it above my character. As a class I’m using one of the child (baby boy) actor.

Maybe this will help you get where you need to, if not then at least I had some fun making this. See screenshots below.

Comment due to max screenshot limit.

281463-daddyandtwoboys.png

Comment due to max screenshot limit.

Hello DonBusso,

thank you very much, but you missed, that none of the actors is ever spawned :frowning:
Sorry if you have wasted your time.
I was able to figure out how to create my own bp node to do what I was looking for.
I will make a YouTube video out of it and link it to this question for everyone else having trouble.

That’s good and it’s never a waste, always learn something new in the process. :slight_smile:

These 2 pics do the same thing, but one is easier to read, simply right click a pin and click “split struct”.
(this may be a dupe post, i cant find the first one i made)