x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How do I get a list of all blueprint classes, that are a child of a specific blueprint at runtime?

How do I get a list of all blueprint classes, that are a child of a specific blueprint, at runtime?

For example: Say, I have a Blueprint called: "Parent" Parent has 3 child blueprints, called "ChildA", "ChildB", and "ChildC"

Is there a way to add those three child classes to a class array dynamically at runtime?

Product Version: Not Selected
Tags:
more ▼

asked Oct 10 '14 at 07:00 PM in Blueprint Scripting

avatar image

Erdrik
418 47 52 73

avatar image Jacky Oct 10 '14 at 07:06 PM

Get All Actors of Class should do what you want. You set the parent BP class and it gives you an array of all the blueprints based on it.

avatar image Erdrik Oct 10 '14 at 09:53 PM

That returns actors of the class that are already spawned. I want an array of classes that can be spawned.

Basically, I want it to return a list of the blueprint classes that Ive added to the content browser.

avatar image Jacky Oct 10 '14 at 09:59 PM

Now I'm confused since your first post says at runtime and that node does exactly that?

avatar image Erdrik Oct 10 '14 at 11:25 PM

The node is looking for the wrong thing. I want classes not spawned actors.

avatar image Jacky Oct 10 '14 at 11:37 PM

Ah, ok. My mistake.

avatar image Muzaheed Mar 28 '15 at 03:19 PM

did u find any solution of it? through blueprint or c++ ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

I have been looking for a way to do this as well and unable to find a solution, but have found a decent compromise:

If you add an array of the Parent type to a Blueprint (say, your Controller), you can go into the Defaults tab of that Blueprint and fill the array manually there using the dropdowns. It's faster and cleaner than doing it with Event Graph nodes.

more ▼

answered Dec 14 '14 at 10:49 PM

avatar image

JeromeParent
1.1k 63 32 96

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

:X Why don't you add them before runtime? Just make a Class Array and add these 3 per hand.

I don't think you can get classes of nonused BPs. :/

more ▼

answered Oct 10 '14 at 10:03 PM

avatar image

eXi
6.8k 333 185 468

avatar image Erdrik Oct 10 '14 at 11:03 PM

I know I can add them manually before runtime. I wanted to set it up so I could make new classes at a later date, without having to constantly update the list manually.

avatar image Jeka3d Jan 12 '16 at 08:26 PM

same there) think we need new node "get child classes"

avatar image Gomo Mar 13 '16 at 11:50 PM

It would be useful to have such functionality. In UMG when creating list of items able to pick up or buildings to build - now I need to make data tables or arrays, which on the long run can be messy and unreliable. Getting one array of classes derived from one particular class would solve quick feeding scroll list, combo boxes etc.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question