![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <FastArraySerializer.h>
Inheritance diagram for FFastArraySerializer:Classes | |
| struct | CPostReplicatedReceiveFuncable |
| struct | FPostReplicatedReceiveParameters |
Public Member Functions | |
| NETCORE_API | FFastArraySerializer () |
| NETCORE_API | ~FFastArraySerializer () |
| void | MarkItemDirty (FFastArraySerializerItem &Item) |
| void | MarkArrayDirty () |
| void | IncrementArrayReplicationKey () |
| void | PreReplicatedRemove (const TArrayView< int32 > &RemovedIndices, int32 FinalSize) |
| void | PostReplicatedAdd (const TArrayView< int32 > &AddedIndices, int32 FinalSize) |
| void | PostReplicatedChange (const TArrayView< int32 > &ChangedIndices, int32 FinalSize) |
| template<typename Type , typename SerializerType > | |
| bool | ShouldWriteFastArrayItem (const Type &Item, const bool bIsWritingOnClient) const |
| void | SetDeltaSerializationEnabled (const bool bEnabled) |
| const EFastArraySerializerDeltaFlags | GetDeltaSerializationFlags () const |
Static Public Member Functions | |
| template<typename Type , typename SerializerType > | |
| static bool | FastArrayDeltaSerialize (TArray< Type > &Items, FNetDeltaSerializeInfo &Parms, SerializerType &ArraySerializer) |
| static const int32 | GetMaxNumberOfAllowedChangesPerUpdate () |
| static const int32 | GetMaxNumberOfAllowedDeletionsPerUpdate () |
Public Attributes | |
| TMap< int32, int32 > | ItemMap |
| int32 | IDCounter |
| int32 | ArrayReplicationKey |
| TMap< int32, FFastArraySerializerGuidReferences > | GuidReferencesMap |
| TMap< int32, FGuidReferencesMap > | GuidReferencesMap_StructDelta |
Base struct for wrapping the array used in Fast TArray Replication
| FFastArraySerializer::FFastArraySerializer | ( | ) |
|
default |
|
static |
Performs "standard" delta serialization on the items in the FastArraySerializer. This method relies more on the INetSerializeCB interface and custom logic and sends all properties that aren't marked as SkipRep, regardless of whether or not they've changed. This will be less CPU intensive, but require more bandwidth.
| Items | Array of items owned by ArraySerializer. |
| Parms | Set of parms that dictate what serialization will do / return. |
| ArraySerializer | The typed subclass of FFastArraySerializer that we're serializing. |
The function that implements Fast TArray Replication
|
inline |
|
inline |
|
inline |
This must be called if you just remove something from the array
|
inline |
This must be called if you add or change an item in the array
|
inline |
Called after adding all new elements and after the elements themselves are notified. The indices are valid for this function call only!
NOTE: intentionally not virtual; invoked via templated code,
|
inline |
Called after updating all existing elements with new data and after the elements themselves are notified. The indices are valid for this function call only!
NOTE: intentionally not virtual; invoked via templated code,
|
inline |
Called before removing elements and after the elements themselves are notified. The indices are valid for this function call only!
NOTE: intentionally not virtual; invoked via templated code,
|
inline |
Helper function for FastArrayDeltaSerialize to consolidate the logic of whether to consider writing an item in a fast TArray during network serialization. For client replay recording, we don't want to write any items that have been added to the array predictively.
| int32 FFastArraySerializer::ArrayReplicationKey |
Counter used to track array replication.
| TMap<int32, FFastArraySerializerGuidReferences> FFastArraySerializer::GuidReferencesMap |
List of items that need to be re-serialized when the referenced objects are mapped
| TMap<int32, FGuidReferencesMap> FFastArraySerializer::GuidReferencesMap_StructDelta |
List of items that need to be re-serialized when the referenced objects are mapped.
| int32 FFastArraySerializer::IDCounter |
Counter used to assign IDs to new elements.