UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ObjectEditorOptionalSupport.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/NotNull.h"
7
8#if WITH_EDITORONLY_DATA
9
10class FArchive;
11class UObject;
12class UClass;
13struct FGuid;
14
15namespace UE::EditorOptional
16{
17
19
21
23
24 template<typename EditorOptionalClass>
26 {
27 // use the non-templated version of this function, and typecast the result (we don't need CastChecked since we know it's the right class)
28 return Cast<EditorOptionalClass>(CreateEditorOptionalObject(MainObject, EditorOptionalClass::StaticClass()));
29 }
30}
31
32#endif
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T TNotNull
Definition NotNull.h:307
Definition Archive.h:1208
Definition Class.h:3793
Definition Object.h:95
Definition Guid.h:109