How to handle a new component in child class?
Hi, I would like to ask you how to handle a child class of parent class having two additional elements not implemented in the parent class. Because in the parent class there are elements that I turn on and off and their handling of these events is placed in Character's BP. I would like to know how to join or do in a child class event that will allow you to turn on and off the next elements that previously did not occur.
In the simplest terms, the parent class has one light source that is turned off and on. The child's class has two light sources. How to handle the second light source in the child's class when the event is handle in Character's BP.
asked Feb 24 '19 at 09:22 PM in Using UE4
You can't directly access it but it's common to instead make a function in the parent that the child can override and add logic to.
So let's say you have a function in your Parent called TurnOffAllLights and in it you set the parent's light component off.
In the Child you would Override TurnOffAllLights, call the Parent's Version (Right click the function node and choose Add Call To PArent Function), then add your logic to the end.
answered Feb 26 '19 at 04:43 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here