![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PropertyReplicationState.h>
Classes | |
| struct | FCallRepNotifiesParameters |
| struct | FPollParameters |
Public Types | |
| enum | : unsigned { TArrayElementChangeMaskBits = 63U , TArrayPropertyChangeMaskBitIndex = 0U , TArrayElementChangeMaskBitOffset = 1U } |
Protected Member Functions | |
| IRISCORE_API void | MarkArrayDirty (uint32 Index) |
ReplicationState created at runtime using a descriptor built from existing reflection data StateBuffer contains storage for all properties described by the descriptor, When polling data from the source object properties we will compare the value with what we have stored in the statebuffer and mark the member as dirty.if the value differs
Polling is quite expensive but we only do it once per update of the replication system
|
explicit |
Construct a new state, StateBuffer will be allocated and constructed according to data in the descriptor
| UE::Net::FPropertyReplicationState::FPropertyReplicationState | ( | const FReplicationStateDescriptor * | Descriptor, |
| uint8 * | InStateBuffer | ||
| ) |
Construct a new state, using already constructed state in InStateBuffer
| UE::Net::FPropertyReplicationState::~FPropertyReplicationState | ( | ) |
| UE::Net::FPropertyReplicationState::FPropertyReplicationState | ( | const FPropertyReplicationState & | Other | ) |
Copy constructor, will not copy internal data
| void UE::Net::FPropertyReplicationState::CallRepNotifies | ( | void *RESTRICT | DstData, |
| const FCallRepNotifiesParameters & | Params | ||
| ) | const |
Invoke repnotifies for all dirty members
|
inline |
| void UE::Net::FPropertyReplicationState::CopyDirtyProperties | ( | const FPropertyReplicationState & | Other | ) |
Copy dirty properties from the other state including changemask
Retrieve the value at the provided Index by writing it to DstValue. The property is looked up from the descriptor using the index. Mostly intended for test code. Normal use of this class is through the poll layer.
|
inline |
|
inline |
If state has custom conditionals then this function will check whether the condition is enabled or not. If state doesn't have custom conditionals it will return true.
Is the property at the given index dirty, for properties with multiple bits in the statemask this will return true if any of those bits are set
| bool UE::Net::FPropertyReplicationState::IsDirtyForPolling | ( | ) | const |
Returns true if state is marked dirty for polling
| bool UE::Net::FPropertyReplicationState::IsValid | ( | ) | const |
Either StateBuffer is initialized and owned by this instance, or we have been injected with a state from the network system A default constructed state is not valid
Explicitly mark an array at the given Index as dirty. It will not mark element changemask bits as dirty.
Explicitly mark the property at the given Index as dirty, for properties with multiple bits in the statemask this will mark all bits dirty
| FPropertyReplicationState & UE::Net::FPropertyReplicationState::operator= | ( | const FPropertyReplicationState & | Other | ) |
Assignment operator, it is debatable if this should be provided or not. if we are copying to a bound state we will perform a Set which will do a full property compare to properly update dirtiness if we are copying to a loose state we will just to a copy of all properties contained in the state, changemask will also be copied
Poll data from object referencing properties in SrcData, Note: SrcData is a UObject containing properties. Behaves like PollPropertyReplicationState when it comes to dirtiness and such.
| bool UE::Net::FPropertyReplicationState::PollPropertyReplicationState | ( | const void *RESTRICT | SrcData | ) |
$IRIS TODO: Move Poll/Push/CallRepNotifies out of PropertyReplicationState as loose functions Poll src data from properties in SrcData, where SrcData is a UClass/UStruct containing properties. Compare and update representation in DstStateBuffer and update ChangeMask. This is currently used to track and update dirtiness for the properties.
| bool UE::Net::FPropertyReplicationState::PollPushBasedPropertyReplicationState | ( | const void *RESTRICT | SrcData, |
| const FPollParameters & | PollParameters | ||
| ) |
Partial poll src data from properties in SrcData based on the state of the inlined per member pollmask non-pushbased properties are always polled, Compare and update representation in DstStateBuffer and update ChangeMask. This is currently used to track and update dirtiness for the properties. @SrcData is a UClass/UStruct containing properties.
| void UE::Net::FPropertyReplicationState::PushPropertyReplicationState | ( | const UObject * | Owner, |
| void *RESTRICT | DstData, | ||
| bool | bPushAll = false |
||
| ) | const |
Push received state data to properties in DstData buffer. Note: DstData is a UClass/UStruct containing properties. Updates representation in DstStateBuffer and mark destination properties as dirty if updated.
| void UE::Net::FPropertyReplicationState::Set | ( | const FPropertyReplicationState & | Other | ) |
Set from Other this will update dirtiness by comparing all properties
Set the value at the provided Index, The UProperty is looked up from the descriptor using the index, if the value differs the statemask is updated Mostly intended for test code Normal use of this class is through the poll layer TODO: It would be nice if we could provide some validation on property types
| bool UE::Net::FPropertyReplicationState::StoreCurrentPropertyReplicationStateForRepNotifies | ( | const void *RESTRICT | SrcData, |
| const FPropertyReplicationState * | NewStateToBeApplied | ||
| ) |
Certain rep notifies requires the current state to be stored before we overwrite it, this method will copy property values from src data, , where SrcData is a UClass/UStruct containing properties if the property is marked as dirty in NewStateToBeApplied
Debug output state to FString
| const TCHAR * UE::Net::FPropertyReplicationState::ToString | ( | FStringBuilderBase & | StringBuilder, |
| bool | bIncludeAll = true |
||
| ) | const |
Debug output state to StringBuilder