Get all child classes of a parent class
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++. :(
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 :)
asked Jul 04 '19 at 07:10 AM in Blueprint Scripting
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here