LoginSignup
3
1

More than 1 year has passed since last update.

[UE4] UE4.25以降のEditorマルチプレイでサーバーへの接続を手動にする

Posted at

【概要】

UE4ではEditorでマルチプレイを開始すると、デフォルトでクライアントはサーバーに自動的に接続するように設定されている。
非常に便利で有り難いのだが、たまに手動で接続を行いたい場合もある。
UE4.24までは、Auto Connect To Serverをfalseに設定することで、自動接続をオフにして手動で接続することが出来た。

ただし、UE4.25以降ではこの設定が非推奨になり表示されなくなってしまった。

LevelEditorPlaySettings.h
/**
 * When running multiple players or a dedicated server the client need to connect to the server, this option sets how they connect
 *
 * If this is checked, the clients will automatically connect to the launched server, if false they will launch into the map and wait
 */
UE_DEPRECATED(4.25, "This variable is no longer read. Use PlayNetMode = EPlayNetMode::PIE_Standalone instead to prevent auto-connection.")
UPROPERTY(config)
bool AutoConnectToServer;

ここでは、4.25以降で接続を手動にする方法を記載する。

【方法】

以下の手順でプレイすることにより、手動でサーバーに接続することが出来る。
1.Editor Preferences > Level Editor > Play > Multiplayer Options > Launch Separate Serverをtrueに設定
2.NetModeをPlay Standaloneに設定しプレイ
3.open 127.0.0.1:<ポート番号>でサーバーに接続(ポート番号は同じくEditor設定のServerPortから設定可能)

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1