FFastArraySerializer

Base struct for wrapping the array used in Fast [TArray](API\Runtime\Core\Containers\TArray) Replication

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

NetCore

Header

/Engine/Source/Runtime/Net/Core/Classes/Net/Serialization/FastArraySerializer.h

Include

#include "Net/Serialization/FastArraySerializer.h"

Syntax

struct FFastArraySerializer

Remarks

Base struct for wrapping the array used in Fast TArray Replication

Variables

Name Description

Public variable

int32

 

ArrayReplicationKey

Counter used to track array replication.

Public variable

TMap< int32, FF...

 

GuidReferencesMap

List of items that need to be re-serialized when the referenced objects are mapped

Public variable

TMap< int32, FG...

 

GuidReferencesMap_StructDelta

List of items that need to be re-serialized when the referenced objects are mapped.

Public variable

int32

 

IDCounter

Counter used to assign IDs to new elements.

Public variable

TMap< int32, in...

 

ItemMap

Maps Element ReplicationID to Array Index.

Constructors

Name Description

Public function

FFastArraySerializer()

Destructors

Name Description

Public function

~FFastArraySerializer()

Functions

Name Description

Public function Static

bool

 

FastArrayDeltaSerialize

(
    TArray< Type >& Items,
    FNetDeltaSerializeInfo& Parms,
    SerializerType& ArraySerializer
)

Performs "standard" delta serialization on the items in the FastArraySerializer.

Public function Const

const EFastA...

 

GetDeltaSerializationFlags()

Public function Static

const int32

 

GetMaxNumberOfAllowedChangesPerUpdate()

Public function Static

const int32

 

GetMaxNumberOfAllowedDeletionsPerUpdate()

Public function

void

 

IncrementArrayReplicationKey()

Public function

void

 

MarkArrayDirty()

This must be called if you just remove something from the array

Public function

void

 

MarkItemDirty

(
    FFastArraySerializerItem& Item
)

This must be called if you add or change an item in the array

Public function

void

 

PostReplicatedAdd

(
    const TArrayView< int32 >& AddedIn...,
    int32 FinalSize
)

Called after adding all new elements and after the elements themselves are notified.

Public function

void

 

PostReplicatedChange

(
    const TArrayView< int32 >& Changed...,
    int32 FinalSize
)

Called after updating all existing elements with new data and after the elements themselves are notified.

Public function

void

 

PreReplicatedRemove

(
    const TArrayView< int32 >& Removed...,
    int32 FinalSize
)

Called before removing elements and after the elements themselves are notified.

Public function

void

 

SetDeltaSerializationEnabled

(
    const bool bEnabled
)

Public function Const

bool

 

ShouldWriteFastArrayItem

(
    const Type& Item,
    const bool bIsWritingOnClient
)

Helper function for FastArrayDeltaSerialize to consolidate the logic of whether to consider writing an item in a fast TArray during network serialization.

Classes

Name

Description

Public struct

CPostReplicatedReceiveFuncable

Concept used to detect if PostReplicatedReceive is defined or not.

Public struct

FPostReplicatedReceiveParameters

If a function with the signature void PostReplicatedReceive(const FFastArraySerializer::FPostReplicatedReceiveParameters& Parameters) is defined in the derived struct It will be called after each call to NetDeltaSerialize on the receiving end, including if we have mapped some unmapped objects

Constants