UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NonNullPropertyUtils.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/Optional.h"
7
8namespace UE::CoreUObject
9{
15
16#if WITH_EDITORONLY_DATA
18 {
19 public:
20 // If set, InBehavior will adjust later code in stack to adopt the behavior
21 // If not set, prevailing behavior is preserved
24
25 EAllowSetNullOnNonNullableBehavior GetBehavior() const;
26
27 private:
32
34 EAllowSetNullOnNonNullableBehavior Behavior;
35 bool bIsBehaviorSet;
36 };
37
38 // Thread local, set with FScopedSetNullOnNonNullable
39 // If true, will allow setting null on a NonNullable property
40 // Some cases in editor deserialization requires null to be set on NonNull properties
41 // Example: deserializing a previously null value to NonNullable property from the transaction buffer for Undo/Redo
43#else
48#endif
49}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition CoreGlobals.cpp:268
EAllowSetNullOnNonNullableBehavior AllowSetNullOnNonNullableBehavior()
Definition NonNullPropertyUtils.h:44
EAllowSetNullOnNonNullableBehavior
Definition NonNullPropertyUtils.h:11
Definition Optional.h:131