Get the pointer to a player in the gamemode class

I’m trying to access the custom character that I dragged and dropped into the level. How exactly can I get a pointer to that?
Also as a bonus question, when I remove my character from the level and just assign the DefaultPawnClass to the character I wanted, the camera acts the ways it should but the character is invisible. I dragged and dropped a playerstart into the level and just pressed start. I have the code accessible if needed.

Bump. Still haven’t found the answer.

I guess this gonnan be helpful for you, majority of nodes you see in Blueprints are direct buindings of C++ class, some of htem are specially made for blueprint use and they are gethered in UBlueprintFunctionLibrary based classes, one you probably will most useful is UGameplayStatics

Even thru they made for blueprint, you can still use them in C++, it will be probably help transition. And don’t worry if you call those via C++ they are not bound to blueprint lower perfromance, but some functions are not optimized like for example GetAllActorsOfClass, in C++ insted you can use TActorIterator which allows you to break the search loop if you find actors you looking for and save up CPU time, while that function will loop to the end to create resulting array.

There one that you look for:

WorldContextObject is object in perticilae world, so all you need to is deliver any actor pointer to it, if you already in actor just use this.

But normaly in C++ you should get playerconteroller and from that possessed pawn and in single player form actor you can do this ()->GetFirstPlayerController()->GetPawn()

Based on what ive seen on the internet i have been casting ()->GetFirstPlayerController()->GetPawn() into my own character. Is this correct?