# When do my DefaultPawnClass and PlayerController defaults actually get instantiated?

**URL:** <https://forums.unrealengine.com/t/when-do-my-defaultpawnclass-and-playercontroller-defaults-actually-get-instantiated/470092>\
**Category:** Modding\
**Tags:** gamemode, initialization, unreal-engine, question\
**Created:** [August 21, 2020, 12:13am UTC](https://forums.unrealengine.com/t/when-do-my-defaultpawnclass-and-playercontroller-defaults-actually-get-instantiated/470092 "2020-08-21T00:13:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArtVandelay\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ArtVandelay\_1](https://forums.unrealengine.com/u/ArtVandelay_1)\
**Post date:** [August 21, 2020, 12:13am UTC](https://forums.unrealengine.com/t/when-do-my-defaultpawnclass-and-playercontroller-defaults-actually-get-instantiated/470092/1 "2020-08-21T00:13:41Z")

</div>

I’m a little confused as to my responsibilities are as far as creating actual instantiations of my controller and pawn class.

In my GameMode constructor **AGM\_Menu()** , I set the **DefaultPawnClass** and **PlayerControllerClass** using my pawn’s **APlayer\_View\_Pawn::StaticClass()** method.

My question is. When do the actual instantiations happen? I’m just telling The game mode what the default classes are here right? Where do the actual objects come to life?

I added a photo of some code that is causing me problems and I think my question will lead me to figuring out how to fix it.

Obviously the pawn i’m trying to access isn’t instantiated at this point I’m trying to access it. Strangely before it was running fine just like this. Is there a method to put this possession code in that happens at a better point in the creation cycle?

Thanks for your time.

 ![310874-ue4question.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/a/b1a92fffb71063c9d4d0c0684879e367c729eeb6.jpeg)

---

<div class="post-metadata">

**Author:** ![ArtVandelay\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ArtVandelay\_1](https://forums.unrealengine.com/u/ArtVandelay_1)\
**Post date:** [August 21, 2020, 12:23am UTC](https://forums.unrealengine.com/t/when-do-my-defaultpawnclass-and-playercontroller-defaults-actually-get-instantiated/470092/2 "2020-08-21T00:23:58Z")

</div>

Nevermind. I figured out where. The GenericPlayerInitialization will work for what I am looking for.

---

<div class="post-metadata">

**Author:** ![ArtVandelay\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ArtVandelay\_1](https://forums.unrealengine.com/u/ArtVandelay_1)\
**Post date:** [August 21, 2020, 5:44am UTC](https://forums.unrealengine.com/t/when-do-my-defaultpawnclass-and-playercontroller-defaults-actually-get-instantiated/470092/3 "2020-08-21T05:44:44Z")

</div>

Well I believe through the sidebar reccommendations I’ve found the answer to half my question. Here is a link I found as to where the instantiations occur.

> **[Where are instances of Default PlayerControllers and Pawns created in GameMode?](https://forums.unrealengine.com/questions/323442/view.html)**
>
> Hello, I'd like to control the spawning of the default PlayerControllers and Pawns that I'm setting in the GameMode constructor but I don't know which function would be optimal to override. The reason is that I want to do further setup on the one...

Now I’m just wondering where is a better place to do the Possession logic?
