Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/ULocalPlayer
Description
Set the connection identifier for this local user.
The connection identifier is a unique identifier for this local user on a client and is used to associate the local player that began a connection handshake with a player controller replicated to the client when the connection handshake is complete.
Only set this if you are connecting to a game server outside of the normal connection flow in the engine (e.g. you are sending NMT_Join manually to initiate a connection).
This is the expected flow for how the connection identifier should be used:
- (Client) Set the connection identifier before sending NMT_Join, NMT_JoinSplit, NMT_JoinNoPawnSplit or NMT_JoinNoPawn.
- (Client) The connection identifier is sent with the join message as a URL argument.
- (Server) Set the connection identifier on the player controller spawned on the game server.
- (Client) Match the player controller connection identifier to the correct local user connection identifier.
| Name | SetConnectionIdentifier |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/LocalPlayer.h |
| Include Path | #include "Engine/LocalPlayer.h" |
| Source | /Engine/Source/Runtime/Engine/Private/LocalPlayer.cpp |
void SetConnectionIdentifier
(
const int32 Id
)