Announcement

Collapse
No announcement yet.

What i sthe Super keyword and how its work

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    Correct, Super() is the UE way of proceeding up the hierarchy.
    Joseph Wilcox
    [Technical Director] WisEngineering
    https://www.wisengineering.com
    https://www.digitalleprechaun.com

    Comment


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

      Code:
      AMotor(parent) -> AElectricMotor(child)
      Calling

      Code:
      virtual void AElectricMotor::DoMotorStuff()
      {
         Super::DoMotorStuff();
      }
      Actually becomes

      Code:
      virtual void AElectricMotor::DoMotorStuff()
      {
         AMotor::DoMotorStuff();
      }
      To the compiler.
      Able Ability System - A high performance, robust ability system for UE4. Now Available!

      Comment

      Working...
      X