AOnlineBeaconHostObject

Base class for any unique beacon connectivity, paired with an [AOnlineBeaconClient](API\Plugins\OnlineSubsystemUtils\AOnlineBeaconClient) implementation

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

OnlineSubsystemUtils

Header

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

Include

#include "OnlineBeaconHostObject.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Transient, Config=Engine, NotPlaceable)
class AOnlineBeaconHostObject : public AActor

Remarks

Base class for any unique beacon connectivity, paired with an AOnlineBeaconClient implementation

By defining a beacon type and implementing the ability to spawn unique AOnlineBeaconClients, any two instances of the engine can communicate with each other without officially connecting through normal Unreal networking

Variables

Name Description

Protected variable UProperty Transient

FString

 

BeaconTypeName

Custom name for this beacon

Protected variable UProperty

TArray< AOnline...

 

ClientActors

List of all client beacon actors with active connections

Protected variable UProperty

TSubclassOf< AO...

 

ClientBeaconActorClass

Class reference for spawning client beacon actor

Constructors

Name Description

Public function

AOnlineBeaconHostObject

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

DisconnectClient

(
    AOnlineBeaconClient* ClientAct...
)

Disconnect a given client from the host

Public function Const

EBeaconState...

 

GetBeaconState()

Get the state of the beacon (accepting/rejecting connections)

Public function Const

const FStrin...

 

GetBeaconType()

Get the type of beacon supported by this host

Public function Const

TSubclassOf<...

 

GetClientBeaconActorClass()

Simple accessor for client beacon actor class

Public function Const

FName

 

GetNetDriverName()

Public function Const

int32

 

GetNumClientActors()

Public function Virtual

void

 

NotifyClientDisconnected

(
    AOnlineBeaconClient* LeavingCl...
)

Notification that a client has been disconnected from the host in some way (timeout, client initiated, etc)

Public function Virtual

void

 

OnClientConnected

(
    AOnlineBeaconClient* NewClient...,
    UNetConnection* ClientConnecti...
)

Delegate triggered when a new client connection is made

Public function Virtual

AOnlineBeaco...

 

SpawnBeaconActor

(
    UNetConnection* ClientConnecti...
)

Each beacon host must be able to spawn the appropriate client beacon actor to communicate with the initiating client

Public function Virtual

void

 

Unregister()

Called when this class is unregistered by the beacon host Do any necessary cleanup.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss