I am trying to do some multiplayer testing using the Network_Features map of ContentExample project.
I know in the editor we can just click the “run dedicated server” and set the client number to run server and clients.
But for some reason I need to do them with parameters and I found I just can not get the client connect to the dedicated server. (while listen server is working fine).
So I create two shortcuts for lunching the server and client.
Here is the parameters I used:
Server:
“C:\Unreal\Epic Games\4.10\Engine\Binaries\Win64\UE4Editor.exe” “C:\ContentExamples\ContentExamples.uproject” Network_Features -server -log
Client:
“C:\Unreal\Epic Games\4.10\Engine\Binaries\Win64\UE4Editor.exe” “C:\ContentExamples\ContentExamples.uproject” 127.0.0.1 -game -log
But it turned out that the client cannot connect to the dedicated server.
If I start the server as listen server, using
“C:\Unreal\Epic Games\4.10\Engine\Binaries\Win64\UE4Editor.exe” “C:\ContentExamples\ContentExamples.uproject” Network_Features?listen -game -log
The client can join it correctly.
So what is the correct way to start a dedicated server and have clients join it?