0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

UE4 DedicatedサーバでのGameMode以下の処理の流れ

Posted at

各GameModeとPlayerActorの作成の順序(BeginPlayが呼ばれる順番)

// Server
[BP_InGameMode_C_0] Server: Call:BP_InGameMode
[BP_InGameState_C_0] Server: Call:BP_InGameState

//Server Client 1を作成
[BP_InGamePlayerStatus_C_0] Server: Call:BP_InGamePlayerStatus
[BP_InGamePlayerController_C_0] Server: Call:BP_InGamePlayerController
[FirstPersonCharacter_C_0] Server: Call:FirstPersonCharacter

// Client 1
[BP_InGamePlayerController_C_0] Client 1: Call:BP_InGamePlayerController
[BP_InGameHud_C_0] Client 1: Call:BP_InGameHud
// Client 1 Client 1を作成
[FirstPersonCharacter_C_0] Client 1: Call:FirstPersonCharacter
[BP_InGameState_C_0] Client 1: Call:BP_InGameState
[BP_InGameSpectarPawn_C_0] Client 1: Call:BP_InGameSpectarPawn
[BP_InGamePlayerStatus_C_0] Client 1: Call:BP_InGamePlayerStatus

//Server Client 2を作成
[BP_InGamePlayerStatus_C_1] Server: Call:BP_InGamePlayerStatus1
[BP_InGamePlayerController_C_1] Server: Call:BP_InGamePlayerController1
[FirstPersonCharacter_C_1] Server: Call:FirstPersonCharacter1

// Client 1 Client 2を作成
[FirstPersonCharacter_C_1] Client 1: Call:FirstPersonCharacter1
[BP_InGamePlayerStatus_C_1] Client 1: Call:BP_InGamePlayerStatus1

// Client 2
[BP_InGamePlayerController_C_0] Client 2: Call:BP_InGamePlayerController
[BP_InGameHud_C_0] Client 2: Call:BP_InGameHud
// Client 2 Client 2とClient 1を作成
[FirstPersonCharacter_C_0] Client 2: Call:FirstPersonCharacter
[FirstPersonCharacter_C_1] Client 2: Call:FirstPersonCharacter1
[BP_InGamePlayerStatus_C_0] Client 2: Call:BP_InGamePlayerStatus
[BP_InGameState_C_0] Client 2: Call:BP_InGameState
[BP_InGameSpectarPawn_C_0] Client 2: Call:BP_InGameSpectarPawn
[BP_InGamePlayerStatus_C_1] Client 2: Call:BP_InGamePlayerStatus1

DedicatedServer

GameMode
GameState

PlayerStatus
PlayerController
FirstPersonCharacter

PlayerStatus1
PlayerController1
FirstPersonCharacter1

Client 1

PlayerController
GameHud
FirstPersonCharacter
GameState
SpectarPawn
PlayerStatus

FirstPersonCharacter1
PlayerStatus1

Client 2

PlayerController
GameHud
FirstPersonCharacter
FirstPersonCharacter1
PlayerStatus
GameState
SpectarPawn
PlayerStatus1

Clientの基本的な処理の流れ

// Client毎の準備の流れ
PlayerController
GameHud
GameState
SpectarPawn

// PlayerSpawnの流れ
FirstPersonCharacter
PlayerStatus

Server側でFirstPersonCharacter作成されたら
順番に作成が走るのでClient 2の場合は順番が前後している雰囲気

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?