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"

What is a parent and child?

Very strange choice of terms. This comes up a lot in the engine, but I've no idea what they mean.

Product Version: UE 4.8
Tags:
more ▼

asked Aug 01 '15 at 04:08 AM in Using UE4

avatar image

Fireheart251
18 3 5 9

avatar image Fireheart251 Aug 01 '15 at 06:15 PM

Thank you both John and jtsmith. I understand now thanks to the two of you.

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

3 answers: sort voted first

Well, it's really simple. Its a concept you find everywhere in programming. For example a parent class would be a mammal, and multiple child classes would be a human, a dog and a cat. Because they are all basically the same, just with some differences. But they can all eat, die, look around, grow, get older, etc. Different to for example a street lantern. So a street lantern would not be a child of mammal. At least I don't know any street lantern which would fit in there ;) With having a parent and multiple childs you can set up functionality and share it in multiple childs, which can extend to it, but they all have at least all the basic functionality.

more ▼

answered Aug 01 '15 at 05:17 AM

avatar image

John Alcatraz
1.3k 60 139 127

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

Much like John said above. A parent sets the basic parameters for each of it's children. Each child "inherits" the same variables, functions, macro's, etc but can override what the parent has set as default behavior as well as create it's own unique variables, functions, macros, etc..

One of the great things about using the parent/child relationship is it makes it easier when casting and searching for particular instances. For example, I am building an RTS similar to Tropico. I have a Building Master BP then I have a child "Residential", "Commercial", and "Industrial" BP that inherits everything from Parent because they all have the same basic needs. With the children, I add specific functionality to each one because Residential has different needs than commercial, industrial, etc.. Then I create my actual building BP as children of the Residential, Commercial, and Industrial BP (which would then make the new ones "grandchildren" of the original Building Master.)

Now, when I go to select the building for, lets say, getting a widget to pop up, I check that the item being clicked and/or hovered over is a descendant of the Building Master BP. If it is, then I display the Building Widget. This makes it much easier to find rather than checking every single building BP individually - if it's a descendant of the Building Master BP then it must be a building. Using parent/child BP has many advantages and is well worth the practice in using them. As a side note, in the next couple of weeks I will be doing a tutorial series on my channel showing people how I am building my RTS game. In my setup, I have many instances of parent/child relationships as well as I use many proxy and manager style blueprints to help organize and easily use the system together. Great for streamlining everything. If interested in checking that out when I start the series then let me know and I will give you my channel name.

Hope my explanation helps!

Jesse

more ▼

answered Aug 01 '15 at 05:47 AM

avatar image

jtsmith
1.4k 70 29 92

avatar image Fireheart251 Aug 01 '15 at 06:13 PM

Yeah, I'd love to check those videos out. :)

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

To add, Child and Parent in UE4 is also to define relationship between components in actor, child component follows parent component, parent component can also control child components and vice versa depending how they are coded.

Unlike class relationship which kind of defined it self in community, this component relationship terms are officially named that way in engine, so watch out to not get confused. Sometimes you can hear child class being called "Subclass" of parent class as engine officially names them this way in one of the C++ types (TSubclassOf which is UClass* just in editor menus it limits selection to specific class relation)

more ▼

answered Aug 01 '15 at 10:02 PM

avatar image

Shadowriver
37.1k 935 172 1116

(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