# Associate Pawn with Extended APlayerState

**URL:** <https://forums.unrealengine.com/t/associate-pawn-with-extended-aplayerstate/320259>\
**Category:** Character & Animation\
**Tags:** playerstate, unreal-engine, pawn, CPP, question\
**Created:** [May 31, 2015, 3:27am UTC](https://forums.unrealengine.com/t/associate-pawn-with-extended-aplayerstate/320259 "2015-05-31T03:27:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0b9c2da0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0b9c2da0](https://forums.unrealengine.com/u/anonymous_user_0b9c2da0)\
**Post date:** [May 31, 2015, 3:27am UTC](https://forums.unrealengine.com/t/associate-pawn-with-extended-aplayerstate/320259/1 "2015-05-31T03:27:20Z")

</div>

In some projects I see an extension of APlayerState used, but I don’t see how that custom player state is associated with the rest of the project.  
How is an extended player state class associated with a pawn class?

---

<div class="post-metadata">

**Author:** ![Zoc](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zoc/32/88714_2.png) [@Zoc](https://forums.unrealengine.com/u/Zoc)\
**Post date:** [May 31, 2015, 3:34am UTC](https://forums.unrealengine.com/t/associate-pawn-with-extended-aplayerstate/320259/2 "2015-05-31T03:34:01Z")

</div>

In your GameMode constructor, you associate them like this:

```
	PlayerControllerClass = AMyPlayerController::StaticClass();
	PlayerStateClass = AMyPlayerState::StaticClass();
	GameStateClass = AMyGameState::StaticClass();
	SpectatorClass = AMySpectatorPawn::StaticClass();

```

Hope it helps! 🙂
