Custom Connection Modes
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.
In
Edit > Editor Preferences > General > Morpheus, ensure that:EditorConnectionStrategyis set toLocal.
In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set totrue.Run Under One Processis set totrue.
Then you can hit
Playwith the optionNew Editor Window (PIE)selected.
1.1. Testing late joining in PIE
When running a PIE server and client, you can enable "late joining" by ticking
Edit > Editor Preferences > General > Experimental > Allow late joining
Once this is ticked, after hitting play, you can add extra clients after the session has already started by clicking the button in the toolbar

1.2. Testing disconnection and reconnection
We have modified the native Unreal Disconnect and Reconnect console commands to be compatible with the Morpheus Platform:
Disconnect- will cause the local client to disconnect from the server. They will remain in the current world, but will be in the "disconnected" state.Reconnect- functionally equivalent to theRestartLevelconsole command. The client will attempt to reconnect to the server upon restarting the level.
2. Running Standalone server and client from Editor locally.
In
Edit > Editor Preferences > Level Editor > Play, ensure that:Multiplayer Options > Launch Separate Serveris set totrue.Multiplayer Options > Run Under One Processis set tofalse.Play in Standalone Game > Additional Launch Parameterscontains-LocalDeployment.Server > Additional Server Launch Parameterscontains-LocalDeployment.
Then you can hit
Playwith the optionStandalone 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.
In
Edit > Editor Preferences > Morpheus Platform > Morpheus, ensure thatEditorConnectionStrategyis set toLocalExternalServer.In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set tofalse.
Then you can hit
Playwith the optionNew 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.
In
Edit > Editor Preferences > Morpheus Platform > Morpheus, ensure thatEditorConnectionStrategyis set toCloud.In
Edit > Editor Preferences > Morpheus Platform > Sign In Settingsensure thatPer Client Sign In Settingshas a single element of TypeSingle Sign On. If not, add one.In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set tofalse.
Ensure that you pass the
-DeploymentName <YourDeploymentName>argument to the Editor when launching it (seeAMorpheusConnection::GetDeploymentName()):Then you can hit
Playwith the optionNew Editor Window (PIE).
5. Connecting with a Standalone Client to a PIE Server.
In
Edit > Editor Preferences > Morpheus Platform > Morpheus, ensure that:Editor Connection Strategyis set toLocal.Should Server Use Default Portsis set totrue.
In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set totrue.Run Under One Processis set totrue.
Then you can hit
Playwith the optionNew Editor Window (PIE).You could also launch more standalone client with
-LocalDeploymentCLI flag.
6. Connecting with a Standalone Client to a Local External Server that's already running.
In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set tofalse.Play in Standalone Game > Additional Launch Parameterscontains-LocalDeployment.
Then you can hit
Playwith the optionStandalone 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.
In
Edit > Editor Preferences > Level Editor > Play, ensure that:Launch Separate Serveris set tofalse.Play in Standalone Game > Additional Launch Parameterscontains-DeploymentName <YourDeploymentName>.
In
Edit > Editor Preferences > Morpheus Platform > Sign In Settingsensure thatPer Client Sign In Settingshas a single element of TypeSingle Sign On. If not, add one.Then you can hit
Playwith the optionStandalone Game.
8. Running a local deployment without the editor.
Ensure that the flag
-LocalDeploymentis passed to both Clients and Server executables which tells them to use the default port numbers instead of random ports.
Overriding default ports
If you want your server to use specific ports, you'd need to pass these CLI args:
-morpheusLocalDeploymentRedisPort <YourRedisPort>.-morpheusLocalDeploymentProxyPort <YourProxyPort>.
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
Was this helpful?

