Navigation
API > API/Plugins > API/Plugins/MassReplication
Manages the creation of NetworkIDs, ClientBubbles and ClientReplicationInfo. NetworkIDs are per replicated Agent Entity and are unique and replicated between server and clients. ClientBubbles relate to the player controller that owns the parent UNetConnection to a Client machine. ClientReplicationInfo relate to all the player controllers that have a parent or child UNetConnection to a single Client machine (split screen etc).
| Name | UMassReplicationSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassReplication/Public/MassReplicationSubsystem.h |
| Include Path | #include "MassReplicationSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UMassReplicationSubsystem : public UMassSubsystemBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UMassSubsystemBase → UMassReplicationSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMassReplicationSubsystem() |
MassReplicationSubsystem.h |
Enums
Public
| Name | Remarks |
|---|---|
| EFindOrAddMassEntityInfo |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CurrentNetMassCounter | uint32 | MassReplicationSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EFindOrAddMassEntityInfo FindAndUpdateOrAddMassEntityInfo
(
const FMassNetworkID NetworkID, |
Finds or adds an FMassReplicationEntityInfo to the EntityInfoMap for an Entity with NetWorkID. | MassReplicationSubsystem.h | |
FMassEntityHandle FindEntity
(
const FMassNetworkID NetworkID |
MassReplicationSubsystem.h | ||
const FMassReplicationEntityInfo * FindMassEntityInfo
(
const FMassNetworkID NetworkID |
Finds the FMassReplicationEntityInfo for the Entity with NetworkID. | MassReplicationSubsystem.h | |
FMassBubbleInfoClassHandle GetBubbleInfoClassHandle
(
const TSubclassOf< AMassClientBubbleInfoBase >& BubbleInfoClass |
MassReplicationSubsystem.h | ||
AMassClientBubbleInfoBase * GetClientBubble
(
FMassBubbleInfoClassHandle BubbleClassHandle, |
Gets the client bubble safely | MassReplicationSubsystem.h | |
AMassClientBubbleInfoBase * GetClientBubbleChecked
(
FMassBubbleInfoClassHandle BubbleClassHandle, |
Get the client bubble. Faster version using check()s | MassReplicationSubsystem.h | |
const TArray< FMassClientHandle > & GetClientReplicationHandles() |
MassReplicationSubsystem.h | ||
const FMassClientReplicationInfo * GetClientReplicationInfo
(
FMassClientHandle Handle |
Gets the client replication info safely | MassReplicationSubsystem.h | |
const FMassClientReplicationInfo & GetClientReplicationInfoChecked
(
FMassClientHandle Handle |
Gets the client replication info. Faster version using check()s | MassReplicationSubsystem.h | |
const TMap< FMassNetworkID, FMassReplicationEntityInfo > & GetEntityInfoMap() |
MassReplicationSubsystem.h | ||
const FReplicationHashGrid2D & GetGrid() |
MassReplicationSubsystem.h | ||
FReplicationHashGrid2D & GetGridMutable() |
MassReplicationSubsystem.h | ||
FMassClientReplicationInfo * GetMutableClientReplicationInfo
(
FMassClientHandle Handle |
Gets the client replication info. Faster version using check()s | MassReplicationSubsystem.h | |
FMassClientReplicationInfo & GetMutableClientReplicationInfoChecked
(
FMassClientHandle Handle |
Gets the client replication info. Faster version using check()s | MassReplicationSubsystem.h | |
FMassNetworkID GetNetIDFromHandle
(
const FMassEntityHandle Handle |
Retrieve network id from Mass handle. | MassReplicationSubsystem.h | |
UE::MassReplication::FMassAgentDelegate & GetOnMassAgentAdded() |
MassReplicationSubsystem.h | ||
UE::MassReplication::FMassAgentDelegate & GetOnRemovingMassAgent() |
MassReplicationSubsystem.h | ||
TType * GetTypedClientBubble
(
FMassBubbleInfoClassHandle BubbleClassHandle, |
Gets the client bubble safely returning the template type | MassReplicationSubsystem.h | |
TType * GetTypedClientBubbleChecked
(
FMassBubbleInfoClassHandle BubbleClassHandle, |
Gets the client bubble returning the template type. Faster version using check()s | MassReplicationSubsystem.h | |
bool IsBubbleClassHandleValid
(
FMassBubbleInfoClassHandle Handle |
MassReplicationSubsystem.h | ||
bool IsValidClientHandle
(
FMassClientHandle ClientHandle |
MassReplicationSubsystem.h | ||
FMassBubbleInfoClassHandle RegisterBubbleInfoClass
(
const TSubclassOf< AMassClientBubbleInfoBase >& BubbleInfoClass |
Registers BubbleInfoClass with the system. | MassReplicationSubsystem.h | |
void RemoveFromEntityInfoMap
(
const FMassNetworkID NetworkID |
MassReplicationSubsystem.h | ||
FMassEntityHandle ResetEntityIfValid
(
const FMassNetworkID NetworkID, |
Resets the item with NetworkID in the EntityInfoMap if its currently Set / Valid and its the most recent ReplicationID. | MassReplicationSubsystem.h | |
void SetEntity
(
const FMassNetworkID NetworkID, |
Must be called immediately after an Entity is added to the simulation and after FindAndUpdateOrAddMassEntityInfo has been called | MassReplicationSubsystem.h | |
void SynchronizeClientsAndViewers() |
MassReplicationSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddClient
(
FMassViewerHandle ViewerHandle, |
Adds a Client and sets up all the data relevant to the bubble. | MassReplicationSubsystem.h | |
void DebugCheckArraysAreInSync() |
MassReplicationSubsystem.h | ||
FMassReplicationEntityInfo * FindMassEntityInfoMutable
(
const FMassNetworkID NetworkID |
MassReplicationSubsystem.h | ||
void RemoveClient
(
FMassClientHandle ClientHandle |
Removes a Client and removes up all the data relevant to the bubble | MassReplicationSubsystem.h | |
bool SynchronizeClients
(
const TArray< FViewerInfo >& Viewers |
MassReplicationSubsystem.h | ||
void SynchronizeClientViewers
(
const TArray< FViewerInfo >& Viewers |
MassReplicationSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
MassReplicationSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. | MassReplicationSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FMassNetworkID GetNextAvailableMassNetID() |
MassReplicationSubsystem.h |