USpectatorBeaconState

A beacon host used for taking reservations for an existing game session

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

USpectatorBeaconState

References

Module

OnlineSubsystemUtils

Header

/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/SpectatorBeaconState.h

Include

#include "SpectatorBeaconState.h"

Syntax

UCLASS(Transient, Config=Engine)
class USpectatorBeaconState : public UObject

Remarks

A beacon host used for taking reservations for an existing game session

Variables

Name Description

Protected variable UProperty Config

bool

 

bRestrictCrossConsole

Are multiple consoles types allowed to play together

Protected variable UProperty Transient

int32

 

MaxReservations

Maximum allowed reservations

Protected variable UProperty Transient

int32

 

NumConsumedReservations

Number of currently consumed reservations

Protected variable

TArray< FUnique...

 

PlayersPendingJoin

Players that are expected to join shortly

Protected variable UProperty Transient

TArray< FSpecta...

 

Reservations

Current reservations in the system

Protected variable UProperty Transient

FName

 

SessionName

Session tied to the beacon

Constructors

Name Description

Public function

USpectatorBeaconState

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

bool

 

AddReservation

(
    const FSpectatorReservation& Reser...
)

Add a reservation to the beacon state, tries to assign a team

Public function Virtual Const

bool

 

CrossPlayAllowed

(
    const FSpectatorReservation& Reser...
)

Perform a cross play compatible check for the new reservation against existing reservations

Public function Virtual Const

bool

 

DoesReservationFit

(
    const FSpectatorReservation& Reser...
)

Determine if this reservation fits all rules for fitting in the game

Public function Virtual Const

void

 

DumpReservations()

Output current state of reservations to log

Public function Virtual Const

int32

 

GetExistingReservation

(
    const FUniqueNetIdRepl& Spectator
)

Get an existing reservation for a given spectator

Public function Virtual Const

int32

 

GetMaxReservations()

Public function Virtual Const

int32

 

GetNumConsumedReservations()

Public function Virtual Const

bool

 

GetPlayerValidation

(
    const FUniqueNetId& PlayerId,
    FString& OutValidation
)

Obtain player validation string from spectator reservation entry

Public function Virtual Const

int32

 

GetRemainingReservations()

Public function Virtual Const

int32

 

GetReservationCount()

Get the current reservation count inside the beacon this is NOT the number of players in the game

Public function Virtual Const

int32

 

GetReservationPlatformCount

(
    const FString& InPlatform
)

Get a count of all players for a given platform

Public function Virtual

TArray< FSpe...

 

GetReservations()

Public function Virtual Const

FName

 

GetSessionName()

Public function Virtual Const

bool

 

HasCrossplayOptOutReservation()

Public function Virtual

bool

 

InitState

(
    int32 InMaxReservations,
    FName InSessionName
)

Initialize this state object

Public function Virtual Const

bool

 

IsBeaconFull()

Public function Virtual Const

bool

 

PlayerHasReservation

(
    const FUniqueNetId& PlayerId
)

Does a given player id have an existing reservation

Public function

void

 

RegisterAuthTicket

(
    const FUniqueNetIdRepl& InSpectato...,
    const FString& InAuthTicket
)

Register user auth ticket with the reservation system Must have an existing reservation entry

Public function Virtual

bool

 

RemovePlayer

(
    const FUniqueNetIdRepl& PlayerId
)

Remove a single player from their reservation

PlayerId player to remove

Public function Virtual

bool

 

RemoveReservation

(
    const FUniqueNetIdRepl& Spectator
)

Remove an entire reservation from this state object

Protected function Const

void

 

SanityCheckReservations

(
    const bool bIgnoreEmptyReservations
)

Check that our reservations are in a good state

Public function Virtual

bool

 

UpdateMemberPlatform

(
    const FUniqueNetIdRepl& Spectator,
    const FString& PlatformName
)

Updates the platform on an existing reservation (Used when MMS does not set a platform when handing out a match assignment)