Custom Connection Modes
Last updated
Was this helpful?
Last updated
Was this helpful?
We always want to set Edit > Editor Preferences > Level Editor > Play > Play Net Mode
to be Play Standalone
.
In Edit > Editor Preferences > General > Morpheus
, ensure that:
EditorConnectionStrategy
is set to Local
.
In Edit > Editor Preferences > Level Editor > Play
, ensure that:
Launch Separate Server
is set to true
.
Run Under One Process
is set to true
.
Then you can hit Play
with the option New Editor Window (PIE)
selected.
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
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
.
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.
In Edit > Editor Preferences > General > Morpheus
, ensure that EditorConnectionStrategy
is set to LocalExternalServer
.
In Edit > Editor Preferences > Level Editor > Play
, ensure that:
Launch Separate Server
is set to false
.
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
).
In Edit > Editor Preferences > General > Morpheus
, ensure that EditorConnectionStrategy
is set to Cloud
.
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.
In Edit > Editor Preferences > Level Editor > Play
, ensure that:
Launch Separate Server
is set to false
.
Ensure that you pass the -DeploymentName <YourDeploymentName>
argument to the Editor when launching it (see AMorpheusConnection::GetDeploymentName()
):
Then you can hit Play
with the option New Editor Window (PIE)
.
In Edit > Editor Preferences > General > Morpheus
, ensure that:
Editor Connection Strategy
is set to Local
.
Should Server Use Default Ports
is set to true
.
In Edit > Editor Preferences > Level Editor > Play
, ensure that:
Launch Separate Server
is set to true
.
Run Under One Process
is set to true
.
Then you can hit Play
with the option New Editor Window (PIE)
.
You could also launch more standalone client with -LocalDeployment
CLI flag.
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
.
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
).
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>
.
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.
Then you can hit Play
with the option Standalone Game
.
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.
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>
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.