Connecting clients to different deployment types

We always want to set Edit > Editor Preferences > Level Editor > Play > Play Net Mode to be Play Standalone.

1. Running PIE server and client locally from Editor.

  1. In Edit > Editor Preferences > General > Morpheus, ensure that:

    • EditorConnectionStrategy is set to Local.

  2. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to true.

    • Run Under One Process is set to true.

  3. Then you can hit Play with the option New Editor Window (PIE) selected.

2. Running Standalone server and client from Editor locally.

  1. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Multiplayer Options > Launch Separate Server is set to true.

    • Multiplayer Options > Run Under One Process is set to false.

    • Play in Standalone Game > Additional Launch Parameters contains -LocalDeployment.

    • Server > Additional Server Launch Parameters contains -LocalDeployment.

  2. Then you can hit Play with the option Standalone Game.

Notice that we don't care about the EditorConnectionStrategy in this case as it will always be the default value and will be ignored as we are running both the client and the server in other processes outside the Editor.

3. Connecting with a PIE Client to a Local External Server that's already running.

  1. In Edit > Editor Preferences > General > Morpheus, ensure that EditorConnectionStrategy is set to LocalExternalServer.

  2. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to false.

  3. Then you can hit Play with the option New Editor Window (PIE).

Notice that this will only work if the Server was started with the Default Ports (i.e started with -LocalDeployment).

4. Connecting with a PIE Client to a Cloud Server.

  1. In Edit > Editor Preferences > General > Morpheus, ensure that EditorConnectionStrategy is set to Cloud.

  2. In Edit > Editor Preferences > General > Sign In Settings ensure that Per Client Sign In Settings has a single element of Type Single Sign On. If not, add one.

  3. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to false.

  4. Ensure that you pass the -DeploymentName <YourDeploymentName> argument to the Editor when launching it (see AMorpheusConnection::GetDeploymentName()):

  5. Then you can hit Play with the option New Editor Window (PIE).

5. Connecting with a Standalone Client to a PIE Server.

  1. In Edit > Editor Preferences > General > Morpheus, ensure that:

    • Editor Connection Strategy is set to Local.

    • Should Server Use Default Ports is set to true.

  2. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to true.

    • Run Under One Process is set to true.

  3. Then you can hit Play with the option New Editor Window (PIE).

  4. You could also launch more standalone client with -LocalDeployment CLI flag.

6. Connecting with a Standalone Client to a Local External Server that's already running.

  1. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to false.

    • Play in Standalone Game > Additional Launch Parameters contains -LocalDeployment.

  2. Then you can hit Play with the option Standalone Game.

Notice that this will only work if the Server is using the default Ports (i.e started with -LocalDeployment).

7. Connecting with a Standalone Client to a Cloud Server.

  1. In Edit > Editor Preferences > Level Editor > Play, ensure that:

    • Launch Separate Server is set to false.

    • Play in Standalone Game > Additional Launch Parameters contains -DeploymentName <YourDeploymentName>.

  2. In Edit > Editor Preferences > General > Sign In Settings ensure that Per Client Sign In Settings has a single element of Type Single Sign On. If not, add one.

  3. Then you can hit Play with the option Standalone Game.

8. Running a local deployment without the editor.

  1. Ensure that the flag -LocalDeployment is passed to both Clients and Server executables which tells them to use the default port numbers instead of random ports.

Overriding default ports

  1. If you want your server to use specific ports, you'd need to pass these CLI args:

  • -morpheusLocalDeploymentRedisPort <YourRedisPort>.

  • -morpheusLocalDeploymentProxyPort <YourProxyPort>.

  1. If you want your standalone client to use specific ports, you'd need to pass these CLI args:

  • -directRedisPort <ServerRedisPort>

  • -proxyPort <ServerProxyPort>

If your connection is still failing:

  • Make sure that the ports being used by the Client are the same ones that the server is using.

    • This can be done by searching through both the Client and Server logs.

  • By default, all Clients/Servers started from the editor will be using the default ports unless overridden.

Last updated