# Setting up default Pawn to use in my game mode

**URL:** <https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331>\
**Category:** Audio\
**Tags:** default-pawn, unreal-engine, question\
**Created:** [August 6, 2016, 3:39pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331 "2016-08-06T15:39:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 6, 2016, 3:39pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/1 "2016-08-06T15:39:16Z")

</div>

Hi there,

i’m just starting to use UE4, so i’m using the documentation tutorials to get started.

Right now, i set the default game mode to use my “MyPongGameMode”, and this works because i print some debug stuff on screen when StartPlay(); gets called.

After that i created a new character class, “MyPongCharacter”, added some debug stuff in BeginPlay(); and set it as default pawn in my “MyPongGameMode” but i can’t see the debug message.

So it’s seems like my character class isn’t used at all, but i did exactly what is written in the documentation…

if somebody could help, thanks in advance.

---

<div class="post-metadata">

**Author:** ![DennyR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DennyR](https://forums.unrealengine.com/u/DennyR)\
**Post date:** [August 6, 2016, 3:42pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/2 "2016-08-06T15:42:58Z")

</div>

Did you set DefaultPawnClass correctly?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 6, 2016, 4:02pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/3 "2016-08-06T16:02:10Z")

</div>

i set DefaultPawnClass = AMyPongCharacter::StaticClass();

in the GameMode constructor

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_86746194](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_86746194](https://forums.unrealengine.com/u/anonymous_user_86746194)\
**Post date:** [August 6, 2016, 4:08pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/4 "2016-08-06T16:08:37Z")

</div>

So you are using C++. Is your game networked? What is your debug code? The GameMode only exists on the server, so depending on your setup your character is spawned on the server and debug code may in fact be running but not in a way visible to the client.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 6, 2016, 4:09pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/5 "2016-08-06T16:09:34Z")

</div>

i’m using c++ indeed, no networking nothing really special, just my gamemode and my character thats all i have atm

EDIT: i wanted things to stay relatively simple 🙂

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [August 6, 2016, 5:38pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/6 "2016-08-06T17:38:57Z")

</div>

It appears you are doing everything right in your GameMode. If there are any GetDefaultPawnClass() getters, you may need to override them, but it is unlikely.  
It sounds like all you need to do is set your MyPongGameMode to the default game mode on your map and, depending on how you want things, In your DefaultEngine.ini. Both of these things can be achieved in editor rather simply. To edite DefaultEngine.ini through a visual interface go to Edit-\>ProjectSettings then under Project go to Maps & Modes then set Default Game Mode. Under the hood this will write to your DefaultEngine.ini just as though you input the values by hand.

 ![101820-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/3/213e22d5a9ae35dfb8656e8e38a29f421bc2e108.png)

Changing the map value is similar in that it can be done from editor but different and deals with overriding the AWorldSettings class values which can be different for every map in your project. If they are not immediately accessible under your World Outliner, double click your World in World Outliner to bring them up. it should look like this.

 ![101821-capture2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/2/a728a7a03b9d575fb3c8f05eb1154df7f6dd56dc.png)

I hope this helps!  
-Spiris

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_86746194](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_86746194](https://forums.unrealengine.com/u/anonymous_user_86746194)\
**Post date:** [August 7, 2016, 12:29am UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/7 "2016-08-07T00:29:10Z")

</div>

Do you have a PlayerStart actor in your level?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 7, 2016, 2:17pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/8 "2016-08-07T14:17:05Z")

</div>

Yes i do have the default PlayerStart actor

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 7, 2016, 2:18pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/9 "2016-08-07T14:18:20Z")

</div>

Hi,

thanks for the answer Spiris but this is my project settings at the moment :

 ![101867-capture_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/4/2d411b26409b4c8d9c83cb2ba4e949864898512a.png)

And this is my World settings selected in the world outliner :

 ![101868-capture_2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/5/645a67934eef3b2a3f928b699e134a562724eae5.png)

---

<div class="post-metadata">

**Author:** ![MrGoatsy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mrgoatsy/32/918697_2.png) [@MrGoatsy](https://forums.unrealengine.com/u/MrGoatsy)\
**Post date:** [August 7, 2016, 2:21pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/10 "2016-08-07T14:21:47Z")

</div>

The images you linked are not working.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 7, 2016, 2:25pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/11 "2016-08-07T14:25:30Z")

</div>

gonna fix

edit : images are fixed

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7750c2cc1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7750c2cc1](https://forums.unrealengine.com/u/anonymous_user_7750c2cc1)\
**Post date:** [August 7, 2016, 4:53pm UTC](https://forums.unrealengine.com/t/setting-up-default-pawn-to-use-in-my-game-mode/366331/12 "2016-08-07T16:53:27Z")

</div>

Problem solved
