Using Own Class for APawn

class CLIENT_API AMyActor : public AActor

class ENGINE_API APawn : public AMyActor, public INavAgentInterface

I got this error

Error 1 error : Duplicate class name: AMyActor also exists in file /Script/Engine …\Intermediate\ProjectFiles\LogCompile projectName

How can I use AMyActor as base class for APawn ???

Thanks a lot …

Hi xAfgun,

How can I use AMyActor as base class for APawn ???

You should not do it. Instead of this, you can create class derived from APawn and add some functionality you need. To use your own pawn class go to Editor → Settings World Settings → Game Mode → Selected GameMode → Default Pawn Class.

Hope it helps!