Search code examples
inheritanceunreal-engine4

Unreal Engine 4 inheritance built-in class (blueprint)


I'm having issues creating my own base class for every pawns, by every i mean character too.

How can i make my MyCharacter inherit MyPawn which inherits MyActor?

Is this possible in blueprint? If not, then it is possible in C++? (without changing the built-in classes)

Thanks!


Solution

  • Yes, this is possible in blueprints and in C++.

    If you want a blueprint pawn parent then just right-click on it in the content browser and select "Create Blueprint based on this".

    If you want a C++ class as parent then use the "Add code to project" button and select "pawn" as parent class. Then, when you create a new blueprint just select your c++ class as parent (hidden behind the small "All Classes" button in the Pick Parent Dialog).