I am trying to connect to a dedicated server from my mobile unreal client, how do I set the remote IP?

I am trying to connect to a dedicated server from my mobile unreal client, how do I set the remote IP?

It works fine in the editor, and I can build a standalone server binary, I just have no idea how to set the remote server for the client (if I wanted to deploy my server in amazon say)

Is there a setting somewhere?

In my game I call the following C++ code on the PlayerController to transfer to a new server when going from my main menu to the actual game:

ClientTravel(URL, TRAVEL_Relative, false, FGuid());

URL is equal to the IP + port like this:

123.456.78.90:7777

By default UE4 starts servers on port 7777 and then increments by one for each additional server.

If you need to make the call from blueprints, you can just wrap it in a BP function like this:

Player Controller h file:

UFUNCTION(BlueprintCallable, Category = "Travel")
void TravelToMap(const FString& URL);

Player Controller cpp file:

void AMyPlayerController::TravelToMap(const FString& URL)
{
	ClientTravel(URL, TRAVEL_Relative, false, FGuid());
}

Awesome, thank you for the quick response, this worked!

I was in the early stages with only one level (which was trying to connect out of the gate), but starting on a main menu, then connecting is a much better idea :slight_smile:

is all this posible with blueprints ? I am actually in the same situation just trying to set all the players (using client game) to automaticly connect to my one dedicated server online and not Lan.