UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
OnlineReplStructs.cpp File Reference

Macros

#define CHECK_REPL_EQUALITY(IdOne, IdTwo, TheBool)
 
#define CHECK_REPL_VALIDITY(IdOne, TheBool)
 
#define WAYTOOLONG
 

Enumerations

enum class  EUniqueIdEncodingFlags : uint8 {
  NotEncoded = 0 , IsEncoded = (1 << 0) , IsEmpty = (1 << 1) , IsPadded = (1 << 2) ,
  Reserved1 = (1 << 3) , Reserved2 = (1 << 4) , Reserved3 = (1 << 5) , Reserved4 = (1 << 6) ,
  Reserved5 = (1 << 7) , FlagsMask = (Reserved1 - 1) , TypeMask = (MAX_uint8 ^ FlagsMask)
}
 

Functions

 ENUM_CLASS_FLAGS (EUniqueIdEncodingFlags)
 
FArchiveoperator<< (FArchive &Ar, FUniqueNetIdRepl &UniqueNetId)
 
uint8 GetTypeHashFromEncoding (EUniqueIdEncodingFlags inFlags)
 
void TestUniqueIdRepl (UWorld *InWorld)
 

Variables

const uint8 TypeHash_Other = 31
 
const uint8 TypeHash_V2 = 30
 

Macro Definition Documentation

◆ CHECK_REPL_EQUALITY

#define CHECK_REPL_EQUALITY (   IdOne,
  IdTwo,
  TheBool 
)
Value:
if (!IdOne.IsValid() || !IdTwo.IsValid() || (IdOne != IdTwo) || (*IdOne != *IdTwo.GetUniqueNetId())) \
{ \
UE_LOG(LogNet, Warning, TEXT(#IdOne) TEXT(" input %s != ") TEXT(#IdTwo) TEXT(" output %s"), *IdOne.ToString(), *IdTwo.ToString()); \
TheBool = false; \
}
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127

◆ CHECK_REPL_VALIDITY

#define CHECK_REPL_VALIDITY (   IdOne,
  TheBool 
)
Value:
if (!IdOne.IsValid()) \
{ \
UE_LOG(LogNet, Warning, TEXT(#IdOne) TEXT(" is not valid")); \
TheBool = false; \
}

◆ WAYTOOLONG

#define WAYTOOLONG
Value:
TEXT(\
"deadbeefba5eba11deadbeefba5eba11 \ deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11 \ deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11 \ deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11 \ deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11 \ deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11deadbeefba5eba11")

Enumeration Type Documentation

◆ EUniqueIdEncodingFlags

Flags relevant to network serialization of a unique id

Enumerator
NotEncoded 

Default, nothing encoded, use normal FString serialization

IsEncoded 

Data is optimized based on some assumptions (even number of [0-9][a-f][A-F] that can be packed into nibbles)

IsEmpty 

This unique id is empty or invalid, nothing further to serialize

IsPadded 

Original data is padded with a leading zero

Reserved1 

Remaining bits are used for encoding the type without requiring another byte

Reserved2 
Reserved3 
Reserved4 
Reserved5 
FlagsMask 

Helper masks

TypeMask 

Function Documentation

◆ ENUM_CLASS_FLAGS()

ENUM_CLASS_FLAGS ( EUniqueIdEncodingFlags  )

◆ GetTypeHashFromEncoding()

uint8 GetTypeHashFromEncoding ( EUniqueIdEncodingFlags  inFlags)
inline

◆ operator<<()

FArchive & operator<< ( FArchive Ar,
FUniqueNetIdRepl UniqueNetId 
)

Serialization to any FArchive

◆ TestUniqueIdRepl()

void TestUniqueIdRepl ( class UWorld InWorld)

Test harness for Unique Id replication

Variable Documentation

◆ TypeHash_Other

const uint8 TypeHash_Other = 31

Use highest value for type for other (out of engine) oss type

◆ TypeHash_V2

const uint8 TypeHash_V2 = 30

Use next highest value for V2 net id