engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 所有成员列表
FFastArraySerializer结构体 参考

Base struct for wrapping the array used in Fast TArray Replication 更多...

#include <NetSerialization.h>

Public 成员函数

void MarkArrayDirty ()
 This must be called if you just remove something from the array
 
void MarkItemDirty (FFastArraySerializerItem &Item)
 This must be called if you add or change an item in the array
 
FORCEINLINE void PostReplicatedAdd (const TArrayView< int32 > &AddedIndices, int32 FinalSize)
 Called after adding all new elements and after the elements themselves are notified. 更多...
 
FORCEINLINE void PostReplicatedChange (const TArrayView< int32 > &ChangedIndices, int32 FinalSize)
 Called after updating all existing elements with new data and after the elements themselves are notified. 更多...
 
FORCEINLINE void PreReplicatedRemove (const TArrayView< int32 > &RemovedIndices, int32 FinalSize)
 Called before removing elements and after the elements themselves are notified. 更多...
 
template<typename Type , typename SerializerType >
bool ShouldWriteFastArrayItem (const Type &Item, const bool bIsWritingOnClient) const
 Helper function for FastArrayDeltaSerialize to consolidate the logic of whether to consider writing an item in a fast TArray during network serialization. 更多...
 

静态 Public 成员函数

template<typename Type , typename SerializerType >
static bool FastArrayDeltaSerialize (TArray< Type > &Items, FNetDeltaSerializeInfo &Parms, SerializerType &ArraySerializer)
 Performs "standard" delta serialization on the items in the FastArraySerializer. 更多...
 

Public 属性

int32 ArrayReplicationKey
 Counter used to track array replication.
 
TMap< int32, FFastArraySerializerGuidReferences > GuidReferencesMap
 List of items that need to be re-serialized when the referenced objects are mapped
 
TMap< int32, FGuidReferencesMap > GuidReferencesMap_StructDelta
 List of items that need to be re-serialized when the referenced objects are mapped.
 
int32 IDCounter
 Counter used to assign IDs to new elements.
 
TMap< int32, int32 > ItemMap
 Maps Element ReplicationID to Array Index.
 

详细描述

Base struct for wrapping the array used in Fast TArray Replication

成员函数说明

◆ FastArrayDeltaSerialize()

template<typename Type , typename SerializerType >
bool FFastArraySerializer::FastArrayDeltaSerialize ( TArray< Type > &  Items,
FNetDeltaSerializeInfo &  Parms,
SerializerType &  ArraySerializer 
)
static

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

The function that implements Fast TArray Replication

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.

参数
ItemsArray of items owned by ArraySerializer.
ParmsSet of parms that dictate what serialization will do / return.
ArraySerializerThe typed subclass of FFastArraySerializer that we're serializing.

◆ PostReplicatedAdd()

FORCEINLINE void FFastArraySerializer::PostReplicatedAdd ( const TArrayView< int32 > &  AddedIndices,
int32  FinalSize 
)
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,

参见
FExampleItemEntry

◆ PostReplicatedChange()

FORCEINLINE void FFastArraySerializer::PostReplicatedChange ( const TArrayView< int32 > &  ChangedIndices,
int32  FinalSize 
)
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,

参见
FExampleItemEntry

◆ PreReplicatedRemove()

FORCEINLINE void FFastArraySerializer::PreReplicatedRemove ( const TArrayView< int32 > &  RemovedIndices,
int32  FinalSize 
)
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,

参见
FExampleItemEntry

◆ ShouldWriteFastArrayItem()

template<typename Type , typename SerializerType >
bool FFastArraySerializer::ShouldWriteFastArrayItem ( const Type &  Item,
const bool  bIsWritingOnClient 
) const
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.


该结构体的文档由以下文件生成: