How to change the default pawn class of the gamemode in C++?

Hello, I’m using UE5.4, I just downloaded the Third Person Template, and am following along with this guide:

However, the guide only tells you how to modify the C++ character, but does not tell you how to change the default pawn class. I tried to follow a solution I found online by doing this:

(I commented out the default code and added the solution I found)

but when I ran the game it was still loading the BP_ThirdPersonCharacter and not my C++ character class.

I did check that I was using the correct game mode:

programming pic 02

Someone online said that I must change the default class in C++ as changing it in the editor is not possible if it’s not a blueprint class

Yes if gamemode is cpp made, you cant modify it content from ue editor.

Make sure you have include ThirdPersonMPCharacter.h from your gamemode.cpp

I opened the project back up today and it was working all of a sudden… I guess this is resolved?

sometime LiveCoding doesnt update important/big changes so a restart is needed.