Change the superclass of an inbuild class?

Hello!

In my game I have some different kinds of pawns, including characters and wheeled vehicles. They should all share some basic functionality, so I wrote a base class for all of them called BasePawn. I would like all my pawns to inherit from this class, therefore I want to change their superclasses to be ABasePawn.
However, if I do that I get error messages saying: “Superclass BasePawn of class Character not found.” and “ABasePawn also exists in file /Script/Engine.”

How can I resolve this errors, or don’t you recommend me to do it like that at all?

Thanks!

This is a very common scenario. Usually your custom base class would inherit APawn, then all other classes inherit your custom class, i.e.

 ... APawn
       |...... AMyGamePawn
                      |....  AMyGameVehicle
                      |....  AMyGameCharacter

You should not add your own classes to the Engine module. Instead put all your custom base and derived classes into your game module.