SerializeOptionalValue

Helper to optionally serialize a value (using operator<< on Archive).

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "Engine/NetSerialization.h"

Syntax

template<typename ValueType>
bool SerializeOptionalValue
(
    const bool bIsSaving,
    FArchive & Ar,
    ValueType & Value,
    const ValueType & DefaultValue
)

Remarks

Helper to optionally serialize a value (using operator<< on Archive). A single signal bit is indicates whether to serialize, or whether to just use the default value. Returns true if the value was not the default and needed to be serialized.

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