SerializeFixedVector

MaxValue is the max abs value to serialize.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/NetSerialization.h

Include

#include "Engine/NetSerialization.h"

Syntax

template<int32 MaxValue, int32 NumBits>
bool SerializeFixedVector
(
    FVector & Vector,
    FArchive & Ar
)

Remarks

MaxValue is the max abs value to serialize. If abs value of any vector components exceeds this, the serialized value will be clamped. NumBits is the total number of bits to use - this includes the sign bit!

So passing in NumBits = 8, and MaxValue = 2^8, you will scale down to fit into 7 bits so you can leave 1 for the sign bit.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss