Customer 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:EditorConnectionStrategy
is set toLocal
.
In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Launch Separate Server
is set totrue
.Run Under One Process
is set totrue
.
Then you can hit
Play
with the optionNew Editor Window (PIE)
selected.
2. Running Standalone server and client from Editor locally.
In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Multiplayer Options > Launch Separate Server
is set totrue
.Multiplayer Options > Run Under One Process
is set tofalse
.Play in Standalone Game > Additional Launch Parameters
contains-LocalDeployment
.Server > Additional Server Launch Parameters
contains-LocalDeployment
.
Then you can hit
Play
with 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 > General > Morpheus
, ensure thatEditorConnectionStrategy
is set toLocalExternalServer
.In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Launch Separate Server
is set tofalse
.
Then you can hit
Play
with 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 > General > Morpheus
, ensure thatEditorConnectionStrategy
is set toCloud
.In
Edit > Editor Preferences > General > Sign In Settings
ensure thatPer Client Sign In Settings
has a single element of TypeSingle Sign On
. If not, add one.In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Launch Separate Server
is set tofalse
.
Ensure that you pass the
-DeploymentName <YourDeploymentName>
argument to the Editor when launching it (seeAMorpheusConnection::GetDeploymentName()
):Then you can hit
Play
with the optionNew Editor Window (PIE)
.
5. Connecting with a Standalone Client to a PIE Server.
In
Edit > Editor Preferences > General > Morpheus
, ensure that:Editor Connection Strategy
is set toLocal
.Should Server Use Default Ports
is set totrue
.
In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Launch Separate Server
is set totrue
.Run Under One Process
is set totrue
.
Then you can hit
Play
with the optionNew Editor Window (PIE)
.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.
In
Edit > Editor Preferences > Level Editor > Play
, ensure that:Launch Separate Server
is set tofalse
.Play in Standalone Game > Additional Launch Parameters
contains-LocalDeployment
.
Then you can hit
Play
with 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 Server
is set tofalse
.Play in Standalone Game > Additional Launch Parameters
contains-DeploymentName <YourDeploymentName>
.
In
Edit > Editor Preferences > General > Sign In Settings
ensure thatPer Client Sign In Settings
has a single element of TypeSingle Sign On
. If not, add one.Then you can hit
Play
with the optionStandalone Game
.
8. Running a local deployment without the editor.
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
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