UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ObjectSerializeAccessScope.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
5
6#if UE_WITH_OBJECT_HANDLE_TRACKING
7
9{
12 {
16
19
21 struct FSuspendScope
22 {
25
26 FSuspendScope(const FSuspendScope&) = delete;
27 FSuspendScope& operator=(const FSuspendScope&) = delete;
28 };
29
30 private:
32
33 //object being serialized
34 const UObject& Object;
35
36 //parent scope for the serialization stack
38
39 //suspend to pause logging.
40 //progress bars for instance can "pause" serialize
41 //and do other work that kick object handle reads
42 bool bSuspended;
43 };
44}
45#define UE_SERIALIZE_ACCCESS_SCOPE(Object) UE::CoreUObject::Private::FObjectSerializeAccessScope PREPROCESSOR_JOIN(_Scope, __LINE__)(*(Object))
46#define UE_SERIALIZE_ACCCESS_SCOPE_SUSPEND() UE::CoreUObject::Private::FObjectSerializeAccessScope::FSuspendScope PREPROCESSOR_JOIN(_Suspend, __LINE__)
47
48#else
49
50#define UE_SERIALIZE_ACCCESS_SCOPE(Object)
51#define UE_SERIALIZE_ACCCESS_SCOPE_SUSPEND()
52
53#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Object.h:95
Definition CoreGlobals.cpp:268