Download

What i sthe Super keyword and how its work

Hi.
Can someone tell me how the Super keyword works?
As I remember this is not how we call method from parent class in c++?
pls help

Correct, Super() is the UE way of proceeding up the hierarchy.

Super is just a templated parameter that goes up to your parent class.



AMotor(parent) -> AElectricMotor(child)


Calling




virtual void AElectricMotor::DoMotorStuff()
{
   Super::DoMotorStuff();
}



Actually becomes



virtual void AElectricMotor::DoMotorStuff()
{
   AMotor::DoMotorStuff();
}


To the compiler.