Classes
ALobbyistClient
Establishes and manages the connection with the server, joining all local players into the lobby.
B
UCLASS (BlueprintType, Blueprintable, Transient, Config = Game, NotPlaceable)
class LOBBYIST_API ALobbyistClient : public AOnlineBeaconClient
Public Methods
void
ClientDisconnected
( const FText& Reason = FText :: GetEmpty ())
Notification from server that we're being disconnected.
V
UFUNCTION (Client, Reliable)
void ClientDisconnected ( const FText & Reason = FText :: GetEmpty ());
virtual void ClientDisconnected_Implementation ( const FText & Reason = FText :: GetEmpty ())
void
ClientLoginComplete
( const FUniqueNetIdRepl& InUniqueId, const FLobbyistLoginResult& InResult)
Notifies the client about the result of a single login attempt.
V
Parameters
InUniqueId
Id of player involved.
InResult
Whether login was successful.
UFUNCTION (Client, Reliable)
void ClientLoginComplete ( const FUniqueNetIdRepl & InUniqueId , const FLobbyistLoginResult & InResult );
virtual void ClientLoginComplete_Implementation ( const FUniqueNetIdRepl & InUniqueId , const FLobbyistLoginResult & InResult )
void
ClientPrepareToTravelToGame
()
Tells the client to prepare to travel to the game.
V
UFUNCTION (Client, Reliable)
void ClientPrepareToTravelToGame ();
virtual void ClientPrepareToTravelToGame_Implementation ()
void
ClientSetupNetworkVoice
( const FUniqueNetIdRepl& PlayerId, bool bRequiresPushToTalk)
Setups voice chat for the specified local player.
V
Parameters
PlayerId
Id of player involved.
bRequiresPushToTalk
Whether voice requires push to talk or is always enabled.
UFUNCTION (Reliable, Client)
void ClientSetupNetworkVoice ( const FUniqueNetIdRepl & PlayerId , bool bRequiresPushToTalk );
virtual void ClientSetupNetworkVoice_Implementation ( const FUniqueNetIdRepl & PlayerId , bool bRequiresPushToTalk )
void
ClientTravelToGame
()
Tells the client to travel to the game.
V
UFUNCTION (Client, Reliable)
void ClientTravelToGame ();
virtual void ClientTravelToGame_Implementation ()
void
ConnectToSession
()
Connects to the lobby (either local or remote) associated with the active online session.
B
UFUNCTION (BlueprintCallable, Category = "Lobby Client" )
void ConnectToSession ();
void
DisconnectFromLobby
()
Gracefully disconnects this client from the lobby.
Should only be called on the owning client, ALobbyistHost::DisconnectClient
for a way to disconnect a client from the host point of view.
V
virtual void DisconnectFromLobby ();
TArray<ALobbyistPlayer*>
GetPlayers
()
Gets the players logged-in by this client.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby Client" )
TArray < ALobbyistPlayer *> GetPlayers () const ;
FName
GetSessionName
()
Gets the name of the session this beacon is associated with.
C
UFUNCTION (BlueprintGetter)
FName GetSessionName () const ;
bool
HasVoiceHandshakeCompleted
()
Gets whether voice handshake between client and server has completed successfully.
C
bool HasVoiceHandshakeCompleted () const ;
void
LoginLocalPlayer
( const ULocalPlayer* InLocalPlayer)
Logins the specified local player.
V
virtual void LoginLocalPlayer ( const ULocalPlayer * InLocalPlayer );
void
LogoutLocalPlayer
( const ULocalPlayer* InLocalPlayer)
Gracefully logouts the specified player from the lobby host beacon.
V
virtual void LogoutLocalPlayer ( const ULocalPlayer * InLocalPlayer );
void
OnFailure
( ENetworkFailure ::Type FailureType)
Called in case of a connection failure.
V
virtual void OnFailure ( ENetworkFailure :: Type FailureType );
bool
ShouldReplicateVoicePacketFrom
( const FUniqueNetId& Sender)
Gets whether a voice packet from the specified sender should be replicated to this client.
V
C
virtual bool ShouldReplicateVoicePacketFrom ( const FUniqueNetId & Sender ) const ;
bool
TravelToGame
( const FString& URL)
Called when the client should travel to the game.
B
V
UFUNCTION (BlueprintNativeEvent, Category = "Lobby Client" )
bool TravelToGame ( const FString & URL );
virtual bool TravelToGame_Implementation ( const FString & URL )
void
VoiceHandshakeComplete
()
Called on authority one voice handshake has completed.
V
virtual void VoiceHandshakeComplete ();
Protected Methods
void
ClientVoiceHandshakeComplete
()
Tells the client that the server has all the information it needs and that it
is ok to start sending voice packets. The server will already send voice packets
when this function is called, since it is set server side and then forwarded.
V
UFUNCTION (Reliable, Client)
void ClientVoiceHandshakeComplete ();
virtual void ClientVoiceHandshakeComplete_Implementation ()
FString
GetLocalPlayerLoginOptions
( const ULocalPlayer& InLocalPlayer)
Gets the URL login options for the specified player.
V
C
virtual FString GetLocalPlayerLoginOptions ( const ULocalPlayer & InLocalPlayer ) const ;
void
OnDisconnected
( const FText& Reason)
Called when the client is gracefully disconnected from the server
(i.e. because the server was gracefully stopped, the client was kicked, etc.).
V
virtual void OnDisconnected ( const FText & Reason );
void
ProcessLocalVoicePackets
()
Processes voice packets originating from local talkers that need to be sent to the server.
V
virtual void ProcessLocalVoicePackets ();
void
ReceiveConnectedToLobby
()
Called when a connection with the remote host is first established.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Client" , Meta = (DisplayName = "Connected To Lobby" ))
void ReceiveConnectedToLobby ();
void
ReceiveDisconnectedFromLobby
( const FText& Reason)
Called when the client is gracefully disconnected from the server
(i.e. because the server was gracefully stopped, the client was kicked, etc.).
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Client" , Meta = (DisplayName = "Disconnected From Lobby" ))
void ReceiveDisconnectedFromLobby ( const FText & Reason );
void
ReceiveLoginComplete
(APlayerController* PlayerController, const FLobbyistLoginResult& LoginResult)
Called when the server has finished logging in a local player.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Client" , Meta = (DisplayName = "Login Complete" ))
void ReceiveLoginComplete ( APlayerController * PlayerController , const FLobbyistLoginResult & LoginResult );
void
ReceiveNetworkFailure
( ENetworkFailure ::Type FailureType)
Called when the client is disconnected from the server because of a network error.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Client" , Meta = (DisplayName = "Network Failure" ))
void ReceiveNetworkFailure ( ENetworkFailure :: Type FailureType );
void
ServerLoginPlayer
( const FString& InSessionId, const FUniqueNetIdRepl& InUniqueId, const FString& UrlString)
Attempts to login a single local player in the remote lobby.
V
Parameters
InSessionId
Session id that the client is expecting to connect with.
InUniqueId
Unique id of the new player.
UrlString
URL containing player options (name, etc).
UFUNCTION (Server, Reliable, WithValidation)
void ServerLoginPlayer ( const FString & InSessionId , const FUniqueNetIdRepl & InUniqueId , const FString & UrlString );
virtual bool ServerLoginPlayer_Validate ( const FString & InSessionId , const FUniqueNetIdRepl & InUniqueId , const FString & UrlString )
virtual void ServerLoginPlayer_Implementation ( const FString & InSessionId , const FUniqueNetIdRepl & InUniqueId , const FString & UrlString )
void
ServerLogoutPlayer
( const FUniqueNetIdRepl& InUniqueId)
Attempts to logout a single local player from the remote lobby.
V
Parameters
InUniqueId
Unique id of the new player.
UFUNCTION (Server, Reliable, WithValidation)
void ServerLogoutPlayer ( const FUniqueNetIdRepl & InUniqueId );
virtual bool ServerLogoutPlayer_Validate ( const FUniqueNetIdRepl & InUniqueId )
virtual void ServerLogoutPlayer_Implementation ( const FUniqueNetIdRepl & InUniqueId )
void
ServerReadyToTravelToGame
()
Notifies the server that this client is ready to travel to the game.
V
UFUNCTION (Server, Reliable, WithValidation)
void ServerReadyToTravelToGame ();
virtual bool ServerReadyToTravelToGame_Validate ()
virtual void ServerReadyToTravelToGame_Implementation ()
Public Properties
bool
bTravelingToGame
Whether the client is traveling to the game.
B
UPROPERTY (BlueprintReadOnly, Category = "Lobby Client" )
bool bTravelingToGame;
ALobbyistState*
LobbyState
Lobby state.
B
UPROPERTY (BlueprintReadOnly, Replicated, Category = "Lobby Client" )
ALobbyistState* LobbyState;
FLobbyistOnClientConnectedToLobby
OnConnectedToLobby
Event fired when a connection with the remote host is first established.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Client" )
FLobbyistOnClientConnectedToLobby OnConnectedToLobby;
FLobbyistOnClientDisconnectedFromLobby
OnDisconnectedFromLobby
Called when the client is gracefully disconnected from the server
(i.e. because the server was gracefully stopped, the client was kicked, etc.).
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Client" )
FLobbyistOnClientDisconnectedFromLobby OnDisconnectedFromLobby;
FLobbyistOnClientLoginComplete
OnLoginComplete
Event fired when the server has finished logging in a local player.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Client" )
FLobbyistOnClientLoginComplete OnLoginComplete;
FLobbyistOnClientNetworkFailure
OnNetworkFailure
Event fired when the client is disconnected from the server because of a network error.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Client" )
FLobbyistOnClientNetworkFailure OnNetworkFailure;
Protected Properties
bool
bVoiceHandshakeCompleted
Whether voice handshake between client and server has completed successfully.
bool bVoiceHandshakeCompleted;
FName
SessionName
Name of the session this beacon is associated with.
B
UPROPERTY (BlueprintGetter = GetSessionName, Category = "Lobby Client" )
FName SessionName;
ALobbyistHost
Manages connected clients, governing the ALobbyistState and the player login/logout flow.
B
UCLASS (BlueprintType, Blueprintable, Transient, Config = Game, NotPlaceable)
class LOBBYIST_API ALobbyistHost : public AOnlineBeaconHostObject
Public Methods
void
BlueprintDisconnectClient
(ALobbyistClient* ClientActor, FText Reason)
Disconnects the specified client.
B
UFUNCTION (BlueprintCallable, BlueprintAuthorityOnly, Category = "Lobby Host" , Meta = (DisplayName = "Disconnect Client" ))
void BlueprintDisconnectClient ( ALobbyistClient * ClientActor , FText Reason );
void
ChangePlayerName
(ALobbyistPlayer* Player, const FString& NewPlayerName)
Changes the name of the specified player.
B
V
UFUNCTION (BlueprintCallable, BlueprintAuthorityOnly, Category = "Lobby Host" )
virtual void ChangePlayerName ( ALobbyistPlayer * Player , const FString & NewPlayerName );
void
DisconnectClient
(AOnlineBeaconClient* ClientActor, const FText& Reason)
Disconnects the specified client.
V
virtual void DisconnectClient ( AOnlineBeaconClient * ClientActor , const FText & Reason );
TArray<ALobbyistClient*>
GetLobbyClients
()
Gets a list of all clients with an active connection.
B
C
UFUNCTION (BlueprintPure, BlueprintAuthorityOnly, Category = "Lobby Host" )
TArray < ALobbyistClient *> GetLobbyClients () const ;
ALobbyistState*
GetLobbyState
()
Gets the lobby state.
C
ALobbyistState * GetLobbyState () const ;
FName
GetSessionName
()
Gets the name of the session this beacon is associated with.
C
UFUNCTION (BlueprintGetter)
FName GetSessionName () const ;
bool
Init
(AOnlineBeaconHost* InBeaconHost)
Initializes the lobby host.
V
virtual bool Init ( AOnlineBeaconHost * InBeaconHost );
void
InitLobbyState
()
Initializes the lobby state.
V
virtual void InitLobbyState ();
void
ProcessLogin
(ALobbyistClient* InClientActor, const FString& InSessionId, const FUniqueNetIdRepl& InUniqueId, const FString& InUrlString)
Processes the login of a given player.
V
Parameters
InClientActor
Client beacon making the request.
InSessionId
Id of the session used by the player.
InUniqueId
Unique id of the player logging in.
InUrlString
URL containing player options (name, etc).
virtual void ProcessLogin ( ALobbyistClient * InClientActor , const FString & InSessionId , const FUniqueNetIdRepl & InUniqueId , const FString & InUrlString );
void
ProcessLogout
(ALobbyistPlayer* ExitingPlayer)
Processes the logout of a given player.
V
Parameters
ExitingPlayer
Player to logout.
virtual void ProcessLogout ( ALobbyistPlayer * ExitingPlayer );
void
ProcessReadyToTravelToGame
(ALobbyistClient* InClientActor)
Processes a notification from a client when he is ready to travel to the game.
V
Parameters
InClientActor
Client beacon making the request.
virtual void ProcessReadyToTravelToGame ( ALobbyistClient * InClientActor );
bool
RequiresPushToTalk
()
Gets whether push to talk is required or if voice is always enabled.
B
V
C
UFUNCTION (BlueprintPure, BlueprintNativeEvent, BlueprintAuthorityOnly, Category = "Lobby Host" )
bool RequiresPushToTalk () const ;
virtual bool RequiresPushToTalk_Implementation () const
void
StartGame
()
Signals all connected clients to start the game.
B
V
UFUNCTION (BlueprintCallable, BlueprintAuthorityOnly, Category = "Lobby Host" )
virtual void StartGame ();
Protected Methods
FLobbyistLoginResult
ApproveLogin
( const FUniqueNetIdRepl& InUniqueId, const FString& InOptions)
Approves or rejects the login request for a given player.
This is the right spot to prevent a login (i.e. because the lobby is full).
B
V
Parameters
InUniqueId
Unique id of the player logging in.
InOptions
Login options (name, etc).
UFUNCTION (BlueprintNativeEvent, Category = "Lobby Host" )
FLobbyistLoginResult ApproveLogin ( const FUniqueNetIdRepl & InUniqueId , const FString & InOptions );
virtual FLobbyistLoginResult ApproveLogin_Implementation ( const FUniqueNetIdRepl & InUniqueId , const FString & InOptions )
void
ConditionalTravelToGame
()
Called when the host is ready to travel to the game and is waiting for confirmation from the connected clients.
V
virtual void ConditionalTravelToGame ();
bool
DoesSessionMatch
( const FString& InSessionId)
Gets whether the specified session id is the same of the session associated with the beacon.
V
C
virtual bool DoesSessionMatch ( const FString & InSessionId ) const ;
bool
InitNewPlayer
(ALobbyistPlayer* NewPlayer, const FString& InOptions)
Initializes a newly spawned player, called during the login process.
@returns True if the initialization was successful; otherwise, false.
V
Parameters
NewPlayer
Player to initialize.
InOptions
Login options (name, etc).
virtual bool InitNewPlayer ( ALobbyistPlayer * NewPlayer , const FString & InOptions );
void
LoginComplete
(ALobbyistClient* InClientActor, const FUniqueNetIdRepl& InUniqueId, const FLobbyistLoginResult& InResult)
Called at the end of the login process.
V
Parameters
InClientActor
Client beacon making the request.
InUniqueId
Unique id of the player logging in.
InResult
Login result.
virtual void LoginComplete ( ALobbyistClient * InClientActor , const FUniqueNetIdRepl & InUniqueId , const FLobbyistLoginResult & InResult );
void
Logout
(ALobbyistPlayer* ExitingPlayer)
Called when a player leaves the lobby.
V
Parameters
ExitingPlayer
The player.
virtual void Logout ( ALobbyistPlayer * ExitingPlayer );
void
PostLogin
(ALobbyistPlayer* NewPlayer)
Called after a player has been successfully logged in.
V
Parameters
NewPlayer
The player.
virtual void PostLogin ( ALobbyistPlayer * NewPlayer );
void
PreLogin
( const FUniqueNetIdRepl& InUniqueId, const FString& InOptions)
Called before processing the login request for a given player.
V
Parameters
InUniqueId
Unique id of the player logging in.
InOptions
Login options (name, etc).
virtual void PreLogin ( const FUniqueNetIdRepl & InUniqueId , const FString & InOptions );
void
ReceivePostLogin
(ALobbyistPlayer* NewPlayer)
Called after a player has been successfully logged in.
This is the right spot to initialize the new player.
B
Parameters
NewPlayer
The player.
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Host" , Meta = (DisplayName = "Post Login" ))
void ReceivePostLogin ( ALobbyistPlayer * NewPlayer );
void
ReceivePreLogout
(ALobbyistPlayer* ExitingPlayer)
Called when a player leaves the lobby.
B
Parameters
ExitingPlayer
The player.
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Host" , Meta = (DisplayName = "Pre Logout" ))
void ReceivePreLogout ( ALobbyistPlayer * ExitingPlayer );
void
ReceiveTravelToGame
()
Called when the host should to travel to the game.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby Host" , Meta = (DisplayName = "Travel To Game" ))
void ReceiveTravelToGame ();
void
RemovePlayer
(ALobbyistPlayer* ExitingPlayer)
Removes a player from the lobby, called at the end of the logout process.
V
Parameters
ExitingPlayer
The player.
virtual void RemovePlayer ( ALobbyistPlayer * ExitingPlayer );
void
SetupVoice
(ALobbyistClient* InClientActor)
Called during the login process to setup voice communication with the specified client.
V
Parameters
InClientActor
Client beacon to setup.
virtual void SetupVoice ( ALobbyistClient * InClientActor );
ALobbyistPlayer*
SpawnPlayer
(ALobbyistClient* InClientActor, const FUniqueNetIdRepl& InUniqueId, const FString& InOptions)
Spawns a new player, called during the login process.
V
Parameters
InClientActor
Client beacon making the request.
InUniqueId
Player's unique id.
InOptions
Login options (name, etc).
virtual ALobbyistPlayer * SpawnPlayer ( ALobbyistClient * InClientActor , const FUniqueNetIdRepl & InUniqueId , const FString & InOptions );
void
TravelToGame
()
Called when the host should travel to the game.
V
virtual void TravelToGame ();
Public Properties
FText
DefaultLoginFailureMessage
Default error message sent to clients when login fails for one of their local players.
ALobbyistHost::ApproveLogin for a way to specify custom login validation logic and errors.
B
UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = "Lobby Host" )
FText DefaultLoginFailureMessage;
FText
DefaultPlayerName
Default player name, used if a player doesn't provide one.
B
UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = "Lobby Host" )
FText DefaultPlayerName;
float
GameStartTimeout
How much time the host should wait for clients to confirm that they're
joining the game before traveling to the game anyway (in seconds).
B
UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = "Lobby Host" , Meta = (Units = "s" ))
float GameStartTimeout;
TSubclassOf<ALobbyistPlayer>
LobbyPlayerClass
Lobby player class.
UPROPERTY (EditAnywhere, NoClear, Category = "Classes" )
TSubclassOf<ALobbyistPlayer> LobbyPlayerClass;
TSubclassOf<ALobbyistState>
LobbyStateClass
Lobby state class.
UPROPERTY (EditAnywhere, NoClear, Category = "Classes" )
TSubclassOf<ALobbyistState> LobbyStateClass;
FLobbyistOnHostPostLogin
OnPostLogin
Event fired after a player has been successfully logged in.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Host" )
FLobbyistOnHostPostLogin OnPostLogin;
FLobbyistOnHostPreLogout
OnPreLogout
Event fired when a player leaves the lobby.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby Host" )
FLobbyistOnHostPreLogout OnPreLogout;
Protected Properties
bool
bTravelingToGame
Set once when travel to game has begun, used to avoid triggering a travel multiple times.
bool bTravelingToGame;
ALobbyistState*
LobbyState
The actor used to replicate relevant properties of the lobby to all clients.
UPROPERTY ()
ALobbyistState* LobbyState;
FName
SessionName
Name of the session this beacon is associated with.
B
UPROPERTY (BlueprintGetter = GetSessionName, Category = "Lobby Host" )
FName SessionName;
FTimerHandle
TimerHandle_TravelToGame
FTimerHandle TimerHandle_TravelToGame;
ALobbyistPlayer
PlayerState counterpart. It's spawned on the server when a player joins the lobby
and replicated to all clients. It stores information about a specific player.
B
UCLASS (BlueprintType, Blueprintable, Transient, Config = Game, NotPlaceable)
class LOBBYIST_API ALobbyistPlayer : public AInfo
Public Methods
ALobbyistClient*
GetLobbyClient
()
Gets the client that owns this player. Only valid on owner client and server.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby Player" )
ALobbyistClient * GetLobbyClient () const ;
ULocalPlayer*
GetLocalPlayer
()
Gets the local player that we represent. Only valid on the owner client.
C
ULocalPlayer * GetLocalPlayer () const ;
APlayerController*
GetLocalPlayerController
()
Gets the local player controller that we represent. Only valid on the owner client.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby Player" )
APlayerController * GetLocalPlayerController () const ;
FString
GetPlayerName
()
Gets the name of this player.
C
UFUNCTION (BlueprintGetter)
FString GetPlayerName () const ;
FName
GetSessionName
()
Gets the name of the session this player is part of.
C
UFUNCTION (BlueprintGetter)
FName GetSessionName () const ;
FUniqueNetIdRepl
GetUniqueNetId
()
Gets the unique id of this player.
C
UFUNCTION (BlueprintGetter)
FUniqueNetIdRepl GetUniqueNetId () const ;
void
Init
( const FUniqueNetIdRepl& InUniqueId, FName InSessionName)
Initializes this player.
V
virtual void Init ( const FUniqueNetIdRepl & InUniqueId , FName InSessionName );
bool
IsLocalPlayer
()
Gets whether this is a local player.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby Player" )
bool IsLocalPlayer () const ;
bool
IsSessionHost
()
Gets whether this player is hosting the session (acting as a listen server).
B
C
UFUNCTION (BlueprintPure, Category = "Lobby Player" )
bool IsSessionHost () const ;
bool
IsSessionOwner
()
Gets whether this player is the session owner (generally true if he created the session).
B
V
C
UFUNCTION (BlueprintPure, Category = "Lobby Player" )
virtual bool IsSessionOwner () const ;
void
RegisterPlayerWithSession
( bool bWasInvited)
Registers this player with the online session.
V
virtual void RegisterPlayerWithSession ( bool bWasInvited );
void
SetPlayerName
( const FString& NewPlayerName)
Sets the name of this player.
void SetPlayerName ( const FString & NewPlayerName );
void
UnregisterPlayerFromSession
()
Unregisters this player from the online session.
V
virtual void UnregisterPlayerFromSession ();
Protected Methods
void
OnPlayerNameChanged
( const FString& OldPlayerName)
Called on authority and remote clients when the player name changes.
B
V
UFUNCTION (BlueprintNativeEvent, Category = "Lobby Player" )
void OnPlayerNameChanged ( const FString & OldPlayerName );
virtual void OnPlayerNameChanged_Implementation ( const FString & OldPlayerName )
void
OnRep_UniqueNetId
()
Called on remote clients when player id is initially replicated.
V
UFUNCTION ()
virtual void OnRep_UniqueNetId ();
ALobbyistServer
Listens for incoming connections from remote clients and routes them to ALobbyistHost .
UCLASS (NotBlueprintable, NotBlueprintType)
class LOBBYIST_API ALobbyistServer : public AOnlineBeaconHost
Public Methods
void
ReplicateVoicePacket
(TSharedPtr<class FVoicePacket> VoicePacket, UNetConnection* CameFromConn)
Replicates the specified voice packet.
V
virtual void ReplicateVoicePacket ( TSharedPtr < class FVoicePacket > VoicePacket , UNetConnection * CameFromConn );
Protected Methods
void
ProcessLocalVoicePackets
()
Processes voice packets originating from local talkers that need to be sent to clients.
V
virtual void ProcessLocalVoicePackets ();
ALobbyistState
GameState counterpart. It's spawned on the server by ALobbyistHost and replicated
to all clients as soon as they join. It maintains an up-to-date list of players who are
currently in the lobby and it's the perfect spot to store global lobby data that needs
to be replicated to all clients.
B
UCLASS (BlueprintType, Blueprintable, Transient, Config = Game, NotPlaceable)
class LOBBYIST_API ALobbyistState : public AInfo
Public Methods
void
AddPlayer
(ALobbyistPlayer* Player)
Adds the specified player to the player array.
void AddPlayer ( ALobbyistPlayer * Player );
ALobbyistHost*
GetLobbyHost
()
Gets the host that controls the lobby and owns this lobby state. Only valid on server.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby State" )
ALobbyistHost * GetLobbyHost () const ;
int32
GetNumPlayers
()
Gets how many players are in the lobby.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby State" )
int32 GetNumPlayers () const ;
ALobbyistPlayer*
GetPlayerByUniqueId
( const FUniqueNetIdRepl& UniqueId)
Gets the player identified by the specified unique net id.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby State" )
ALobbyistPlayer * GetPlayerByUniqueId ( const FUniqueNetIdRepl & UniqueId ) const ;
TArray<ALobbyistPlayer*>
GetPlayers
()
Gets all the players in the lobby.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby State" )
TArray < ALobbyistPlayer *> GetPlayers () const ;
ALobbyistPlayer*
GetSessionOwner
()
Gets the player that owns the session.
B
C
UFUNCTION (BlueprintPure, Category = "Lobby State" )
ALobbyistPlayer * GetSessionOwner () const ;
void
PlayerAdded
(ALobbyistPlayer* AddedPlayer)
Called when a player is added to the lobby.
V
virtual void PlayerAdded ( ALobbyistPlayer * AddedPlayer );
void
PlayerRemoved
(ALobbyistPlayer* RemovedPlayer)
Called when a player is removed from the lobby.
V
virtual void PlayerRemoved ( ALobbyistPlayer * RemovedPlayer );
void
RemovePlayer
(ALobbyistPlayer* Player)
Removes the specified player from the player array.
void RemovePlayer ( ALobbyistPlayer * Player );
Protected Methods
void
ReceivePlayerAdded
(ALobbyistPlayer* Player)
Called when a player is added to the lobby.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby State" , Meta = (DisplayName = "Player Added" ))
void ReceivePlayerAdded ( ALobbyistPlayer * Player );
void
ReceivePlayerRemoved
(ALobbyistPlayer* Player)
Called when a player is removed from the lobby.
B
UFUNCTION (BlueprintImplementableEvent, Category = "Lobby State" , Meta = (DisplayName = "Player Removed" ))
void ReceivePlayerRemoved ( ALobbyistPlayer * Player );
Public Properties
FOnLobbyistPlayerChanged
OnPlayerAdded
Fired when a player is added to the lobby.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby State" )
FOnLobbyistPlayerChanged OnPlayerAdded;
FOnLobbyistPlayerChanged
OnPlayerRemoved
Fired when a player is removed from the lobby.
B
UPROPERTY (BlueprintAssignable, Category = "Lobby State" )
FOnLobbyistPlayerChanged OnPlayerRemoved;
FLobbyistLoginResult
Login result.
USTRUCT (BlueprintType, BlueprintInternalUseOnly)
struct LOBBYIST_API FLobbyistLoginResult
Public Methods
FLobbyistLoginResult
Failure
( const FText& InError = FText :: GetEmpty ())
Creates a new failure login result, with an optional error message.
S
static FLobbyistLoginResult Failure ( const FText & InError = FText :: GetEmpty ());
FText
GetErrorMessage
()
Gets the error message (only valid if login failed).
C
FText GetErrorMessage () const ;
FLobbyistLoginResult
Success
()
Creates a new successful login result.
S
static FLobbyistLoginResult Success ();
bool
WasSuccessful
()
Gets whether login was successful.
C
bool WasSuccessful () const ;
ULobbyistSettings
Lobbyist settings.
B
UCLASS (BlueprintType, Config = Game, DefaultConfig)
class LOBBYIST_API ULobbyistSettings : public UDeveloperSettings
Public Methods
ULobbyistSettings*
GetLobbyistSettings
()
Gets the Lobbyist runtime settings.
B
S
UFUNCTION (BlueprintPure, Category = "Lobbyist" )
static ULobbyistSettings * GetLobbyistSettings ();
Public Properties
TSoftClassPtr<ALobbyistClient>
ClientClass
Client class.
B
UPROPERTY (EditAnywhere, Config, NoClear, BlueprintReadOnly, Category = "General" )
TSoftClassPtr<ALobbyistClient> ClientClass;
TSoftClassPtr<ALobbyistHost>
HostClass
Host class.
B
UPROPERTY (EditAnywhere, Config, NoClear, BlueprintReadOnly, Category = "General" )
TSoftClassPtr<ALobbyistHost> HostClass;
TSoftClassPtr<ALobbyistServer>
ServerClass
Server class.
UPROPERTY (EditAnywhere, Config, NoClear, Category = "General" , AdvancedDisplay)
TSoftClassPtr<ALobbyistServer> ServerClass;
TSoftClassPtr<ULobbyistVoiceChannel>
VoiceChannelClass
Voice channel class.
UPROPERTY (EditAnywhere, Config, NoClear, Category = "General" , AdvancedDisplay)
TSoftClassPtr<ULobbyistVoiceChannel> VoiceChannelClass;
ULobbyistSubsystem
Entry point for all Lobbyist functionality.
Provides methods to create and access both ALobbyistHost and ALobbyistClient
and also provides access to the ALobbyistState .
B
UCLASS ()
class LOBBYIST_API ULobbyistSubsystem : public UGameInstanceSubsystem
Public Methods
ALobbyistClient*
CreateLobbyClient
()
Creates the lobby client.
B
UFUNCTION (BlueprintCallable, Category = "Lobbyist" )
ALobbyistClient * CreateLobbyClient ();
ALobbyistHost*
CreateLobbyHost
()
Creates the lobby host.
B
UFUNCTION (BlueprintCallable, Category = "Lobbyist" )
ALobbyistHost * CreateLobbyHost ();
ULobbyistSubsystem*
Get
( const UGameInstance* InGameInstance)
Gets the Lobbyist subsystem.
S
static ULobbyistSubsystem * Get ( const UGameInstance * InGameInstance );
ULobbyistSubsystem*
Get
( const UWorld* InWorld)
Gets the Lobbyist subsystem.
S
static ULobbyistSubsystem * Get ( const UWorld * InWorld );
ALobbyistClient*
GetLobbyClient
()
Gets the lobby client. Only valid on owner client and server.
B
C
UFUNCTION (BlueprintPure, Category = "Lobbyist" )
ALobbyistClient * GetLobbyClient () const ;
ALobbyistHost*
GetLobbyHost
()
Gets the lobby host. Only valid on server.
B
C
UFUNCTION (BlueprintPure, Category = "Lobbyist" )
ALobbyistHost * GetLobbyHost () const ;
ALobbyistServer*
GetLobbyServer
()
Gets the lobby server.
C
ALobbyistServer * GetLobbyServer () const ;
ALobbyistState*
GetLobbyState
()
Gets the lobby state.
B
C
UFUNCTION (BlueprintPure, Category = "Lobbyist" )
ALobbyistState * GetLobbyState () const ;
void
LeaveLobby
()
Leaves the lobby, cleaning up the local lobby host and/or client accordingly.
B
UFUNCTION (BlueprintCallable, Category = "Lobbyist" )
void LeaveLobby ();
ULobbyistVoiceChannel
Lobbyist specific voice channel that doesn't require a player controller actor.
UCLASS ()
class LOBBYIST_API ULobbyistVoiceChannel : public UVoiceChannel
Public Properties
TWeakObjectPtr<ALobbyistClient>
WeakOwningClient
Client that owns this channel.
TWeakObjectPtr<ALobbyistClient> WeakOwningClient;