@DanM, sorry for the long response time … was applying to uni. Your response was very clear and thanks for the example. Some questions:
- Firstly, what do you mean by “functionality?”
- Secondly,
BeginPlay
shows up in two places:
void UGrabber::BeginPlay() // what is the difference between this BeginPlay()
{
Super::BeginPlay(); // and this BeginPlay()?
}
I know they are both methods of classes (and that one is the method of UGrabber
while the other is the method of UActorComponent
) but is there any difference in what they do/how they work/etc.? Might I be overthinking this?
- Thirdly,
Super
is used in more than one place. How does that work? Is Super
a big class with other classes inside it?
void UGrabber::BeginPlay()
{
Super::BeginPlay(); // here and...
}
// Called every frame
void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction); // ...here
}
Finally, to make sure I understand your response, here’s my summary. Please tell me what’s right/wrong.
Super
is just a class. BeginPlay()
is one of the functions of that class that already has some functionality included because of Unreal Engine code.
Thank you!
Enrico