Manually set up the character and level

Hello. I would like to start game not from world straight away, but to set up the level, world etc manually in c++. Right now engine does all that for me, i got default map and default pawn, and i cant find the code in project which is responsible for setting up the level, character, controller and all that stuff from very beginning. I would like to do most of stuff in c++, not to drag classes into editor to set values here. I feel like i got more control over the project when i have everything in visual studio. The starting point of the game is the GameMode class?

Hello, Pancakez

Game Mode class is instantiated at the moment of level initialization.

In the Game Mode class there are fields for default pawn and player controller. You can use them in constructor of Game Mode like this:

DefaultPawnClass = AMyCharacter::StaticClass();
PlayerControllerClass = AMyController::StaticClass();

To open a level, you can use UGameplayStatics::OpenLevel or UEngine::LoadMap function:

static void OpenLevel (UObject * WorldContextObject, FName LevelName, bool bAbsolute, FString Options)
virtual bool LoadMap (FWorldContext & WorldContext, FURL URL, class UPendingNetGame * Pending, FString & Error)

Hope this helped! Have a great day!

Thanks for answer, i though noone will ever reply here :slight_smile:

So what i need is to make some simple login screen (all offline, no networking yet), As far as i know i have to make empty level with some text input field right? But how can i separate pawn input from the message input? I should store that in GameMode, to know if right now im ingame or im on the entry map, right? Well i did several tutorials but i cant do that specific one thing.