17#include "Object.generated.h"
46 class FFragmentRegistrationContext;
50 struct FNetHandleLegacyPushModelHelper;
117#if UE_WITH_CONSTINIT_UOBJECT
118 explicit consteval UObject(UE::CodeGen::ConstInit::FObjectParams
InParams)
133 template<
class TReturnType>
136 UClass* ReturnType = TReturnType::StaticClass();
146 template<
class TReturnType>
149 UClass* ReturnType = TReturnType::StaticClass();
160 template<
class TReturnType,
class TClassToConstructByDefault>
163 return static_cast<TReturnType*
>(CreateDefaultSubobject(
SubobjectName, TReturnType::StaticClass(), TClassToConstructByDefault::StaticClass(),
true, bTransient));
173 template<
class TReturnType>
176 UClass* ReturnType = TReturnType::StaticClass();
188 template<
class TReturnType,
class TClassToConstructByDefault>
191 return static_cast<TReturnType*
>(CreateDefaultSubobject(
SubobjectName, TReturnType::StaticClass(), TClassToConstructByDefault::StaticClass(),
false, bTransient));
254 UE_DEPRECATED(5.1,
"Use version that takes FPostCDOCompiledContext instead.")
311 COREUOBJECT_API virtual bool IsCapturingAsRootObjectForTransaction()
const;
395#if WITH_EDITORONLY_DATA
422 UE_DEPRECATED(5.3,
"Matinee has been removed in 5.0, nothing is calling PostInterpChange anymore")
544#if UE_WITH_REMOTE_OBJECT_HANDLE
624 UE_DEPRECATED(5.5,
"Multithreaded destruction of UObjects is no longer supported.")
767 return ResSize.GetTotalMemoryBytes();
795#if WITH_VERSE_VM || defined(__INTELLISENSE__)
853 TD_InvariantTz = 1<<2,
884 UE_DEPRECATED(5.4,
"Subscribe to OnGetExtraObjectTagsWithContext instead")
899 UE_DEPRECATED(5.4,
"Implement the version that takes FAssetRegistryTagsContext instead.")
930 UE_DEPRECATED(5.5,
"This function is no longer called. If you require this functionality, please implement ThreadedPostLoadAssetRegistryTagsOverride. " \
931 "Note that this function MUST be safe to call on a background thread. If you have functionality that doesn't meet that requirement, " \
932 "consider using the AssetRegistry's AssetAddedEvent which fires on the game thread.")
1075 UE_DEPRECATED(5.7,
"This function is useless now and will be deleted")
1100 UE_DEPRECATED(5.3,
"Please use the the const version of IsDataValid(FDataValidationContext&)")
1294 UE_DEPRECATED(5.4,
"Call GetDefaultSubobjects for top level subobjects or use ForEachObjectWithOuter with a more precise check")
1317 bool bAllowCopyToDefaultObject =
true;
1319 bool bSaveToLayer =
false;
1328 UE_DEPRECATED(5.0,
"TryUpdateDefaultConfigFile replaces UpdateDefaultConfigFile")
1491 bool Implements()
const;
1511 return FunctionCallspace::Local;
1546 return CallFunctionByNameWithArguments(Cmd, Ar, Executor);
1773 UFUNCTION(BlueprintImplementableEvent, meta=(BlueprintInternalUseOnly =
"true"))
1803 NETFIELD_REP_START = 0,
1804 NETFIELD_REP_END = -1
1816 checkf(
false,
TEXT(
"REPLICATED_BASE_CLASS macro is not implemented in %s. Something went very wrong."), *GetFullName());
1854#if WITH_EDITORONLY_DATA
1898template <
typename T>
1901 static_assert(std::is_base_of<UObject, T>::value,
"GetValid can only work with UObject-derived classes");
1911template <
typename T>
1914 static_assert(std::is_base_of<UObject, T>::value,
"GetValid can only work with UObject-derived classes");
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
@ BeginCacheForCookedPlatformData
@ IsCachedCookedPlatformDataLoaded
FConfigCacheIni * GConfig
Definition CoreGlobals.cpp:54
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_RetVal_OneParam(ReturnValueType, DelegateName, Param1Type)
Definition DelegateCombinations.h:54
#define DECLARE_TS_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:50
#define DECLARE_TS_MULTICAST_DELEGATE_ThreeParams(DelegateName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:68
#define DECLARE_TS_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:59
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
return true
Definition ExternalRpcRegistry.cpp:601
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
const bool
Definition NetworkReplayStreaming.h:178
EPropertyFlags
Definition ObjectMacros.h:416
@ CPF_Config
Property should be loaded/saved as permanent profile.
Definition ObjectMacros.h:433
uint32 ERenameFlags
Definition ObjectMacros.h:2302
EStaticConstructor
Definition ObjectMacros.h:174
#define REN_None
Definition ObjectMacros.h:2305
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
@ Garbage
Garbage from logical point of view and should not be referenced. This flag is mirrored in EObjectFlag...
EObjectFlags
Definition ObjectMacros.h:552
@ RF_MirroredGarbage
Garbage from logical point of view and should not be referenced. This flag is mirrored in EInternalOb...
Definition ObjectMacros.h:598
#define UCLASS(...)
Definition ObjectMacros.h:776
bool IsValidChecked(const UObject *Test)
Definition Object.h:1886
T * GetValid(T *Test)
Definition Object.h:1899
#define RESULT_DECL
Definition Script.h:92
#define CallFunction(Capability, ReturnValue, FunctionName,...)
Definition TypedElementQueryContextImplementation.inl:56
EDataValidationResult
Definition UObjectGlobals.h:4225
FUObjectArray GUObjectArray
Definition UObjectHash.cpp:55
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Size
Definition VulkanMemory.cpp:4034
if(Failed) console_printf("Failed.\n")
Definition Engine.Build.cs:7
Definition Archive.h:1208
Definition AssetRegistryTagsContext.h:98
Definition ConfigCacheIni.h:1240
Definition DataValidation.h:40
Definition UnrealType.h:6738
Definition FeedbackContext.h:30
Definition LinkerLoad.h:124
Definition NameTypes.h:617
Definition ObjectSaveContext.h:193
Definition UObjectGlobals.h:1292
Definition ObjectSaveContext.h:459
Definition ObjectSaveContext.h:554
Definition ObjectSaveContext.h:244
Definition ObjectSaveContext.h:535
Definition UnrealType.h:3087
Definition OutputDevice.h:133
Definition UnrealType.h:174
Definition UObjectGlobals.h:2492
Definition ObjectMacros.h:2402
Definition StructuredArchiveSlots.h:144
Definition StructuredArchiveSlots.h:52
Definition TransactionObjectEvent.h:181
FUObjectItem * IndexToObject(int32 Index)
Definition UObjectArray.h:1089
Definition ObjectMacros.h:180
Definition ITransactionObjectAnnotation.h:19
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition ReplicationFragment.h:244
Definition UObjectBaseUtility.h:45
virtual bool ProcessConsoleExec(const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
Definition Object.h:1544
DECLARE_FUNCTION(execByteConst)
SIZE_T GetResourceSizeBytes(EResourceSizeMode::Type Mode)
Definition Object.h:763
virtual FName GetExporterName(void)
Definition Object.h:774
DECLARE_FUNCTION(execSetArray)
DECLARE_FUNCTION(execSetMap)
DECLARE_FUNCTION(execEqualEqual_DelegateFunction)
virtual void PostRepNotifies()
Definition Object.h:1085
virtual bool IsPostLoadThreadSafe() const
Definition Object.h:614
virtual FString GetDetailedInfoInternal() const
Definition Object.h:215
virtual UClass * RegenerateClass(UClass *ClassToRegenerate, UObject *PreviousCDO)
Definition Object.h:1560
DECLARE_FUNCTION(execNullInterface)
virtual void OverrideConfigSection(FString &SectionName)
Definition Object.h:1402
virtual bool CallRemoteFunction(UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
Definition Object.h:1523
DECLARE_FUNCTION(execComputedJump)
DECLARE_FUNCTION(execInt64Const)
DECLARE_FUNCTION(execVector3fConst)
DECLARE_FUNCTION(execCallMulticastDelegate)
DECLARE_FUNCTION(execFinalFunction)
virtual void PostDuplicate(bool bDuplicateForPIE)
Definition Object.h:538
DECLARE_FUNCTION(execDynArrayInsert)
TReturnType * CreateOptionalDefaultSubobject(FName SubobjectName, bool bTransient=false)
Definition Object.h:174
DECLARE_FUNCTION(execLetWeakObjPtr)
DECLARE_FUNCTION(execLocalVirtualFunction)
DECLARE_FUNCTION(execBindDelegate)
DECLARE_FUNCTION(execContext_FailSilent)
virtual void PostEditImport()
Definition Object.h:686
DECLARE_FUNCTION(execEndFunctionParms)
DECLARE_FUNCTION(execEatReturnValue)
TReturnType * CreateDefaultSubobject(FName SubobjectName, bool bTransient=false)
Definition Object.h:147
DECLARE_FUNCTION(execAutoRtfmTransact)
DECLARE_FUNCTION(execAutoRtfmStopTransact)
DECLARE_FUNCTION(execSkipOffsetConst)
DECLARE_FUNCTION(execStringConst)
DECLARE_FUNCTION(execPopExecutionFlow)
DECLARE_FUNCTION(execUndefined)
DECLARE_FUNCTION(execTransformConst)
DECLARE_FUNCTION(execInstrumentation)
TReturnType * CreateOptionalDefaultSubobject(FName SubobjectName, bool bTransient=false)
Definition Object.h:189
DECLARE_FUNCTION(execJumpIfNot)
virtual bool IsReadyForFinishDestroy()
Definition Object.h:373
DECLARE_FUNCTION(execInstanceVariable)
DECLARE_FUNCTION(execNothingOp4a)
DECLARE_FUNCTION(execClassContext)
virtual void ImportCustomProperties(const TCHAR *SourceText, FFeedbackContext *Warn)
Definition Object.h:679
DECLARE_FUNCTION(execArrayElement)
DECLARE_FUNCTION(execObjectToBool)
COREUOBJECT_API void CallAddReferencedObjects(FReferenceCollector &Collector)
Definition GarbageCollection.cpp:6386
DECLARE_FUNCTION(execClearMulticastDelegate)
ENetFields_Private
Definition Object.h:1802
DECLARE_FUNCTION(execInterfaceContext)
DECLARE_FUNCTION(execVectorConst)
DECLARE_FUNCTION(execStructConst)
DECLARE_FUNCTION(execCast)
UObject WithinClass
Definition Object.h:99
DECLARE_FUNCTION(execClassDefaultVariable)
DECLARE_FUNCTION(execIntZero)
DECLARE_FUNCTION(execBitFieldConst)
virtual bool ResolveSubobject(const TCHAR *SubObjectPath, UObject *&OutObject, bool bLoadIfExists)
Definition Object.h:340
DECLARE_FUNCTION(execSetSet)
DECLARE_FUNCTION(execGetDynArrayLength)
DECLARE_FUNCTION(execIntConst)
DECLARE_FUNCTION(execNoObject)
DECLARE_FUNCTION(execStructCmpEq)
DECLARE_FUNCTION(execInstanceDelegate)
DECLARE_FUNCTION(execIntOne)
DECLARE_FUNCTION(execNotEqual_DelegateFunction)
DECLARE_FUNCTION(execFieldPathConst)
DECLARE_FUNCTION(execDoubleConst)
DECLARE_FUNCTION(execWireTracepoint)
DECLARE_FUNCTION(execObjectConst)
DECLARE_FUNCTION(execInterfaceToInterface)
DECLARE_FUNCTION(execLocalFinalFunction)
virtual bool GetNativePropertyValues(TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
Definition Object.h:743
DECLARE_FUNCTION(execAutoRtfmAbortIfNot)
DECLARE_FUNCTION(execStructMemberContext)
DECLARE_FUNCTION(execSwitchValue)
DECLARE_FUNCTION(execDynArrayAdd)
DECLARE_FUNCTION(execReturnNothing)
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite()
Definition Object.h:808
DECLARE_FUNCTION(execSoftObjectConst)
DECLARE_FUNCTION(execInterfaceToBool)
DECLARE_FUNCTION(execLetValueOnPersistentFrame)
virtual void PostReloadConfig(class FProperty *PropertyThatWasLoaded)
Definition Object.h:691
DECLARE_FUNCTION(execDynArrayRemove)
DECLARE_FUNCTION(execDynamicCast)
virtual void MarkAsEditorOnlySubobject()
Definition Object.h:1573
DECLARE_FUNCTION(execVirtualFunction)
DECLARE_FUNCTION(execDefaultVariable)
DECLARE_FUNCTION(execStructMember)
DECLARE_FUNCTION(execBoolVariable)
virtual int32 GetFunctionCallspace(UFunction *Function, FFrame *Stack)
Definition Object.h:1509
virtual void PostDuplicate(EDuplicateMode::Type DuplicateMode)
Definition Object.h:539
DECLARE_FUNCTION(execDynArrayAddItem)
DECLARE_FUNCTION(execNew)
virtual bool IsEditorOnly() const
Definition Object.h:593
DECLARE_FUNCTION(execPushExecutionFlow)
DECLARE_FUNCTION(execPopExecutionFlowIfNot)
virtual bool AreNativePropertiesIdenticalTo(UObject *Other) const
Definition Object.h:820
DECLARE_FUNCTION(execArrayGetByRef)
DECLARE_FUNCTION(execStructCmpNe)
DECLARE_FUNCTION(execDynArraySort)
virtual COREUOBJECT_API void GetResourceSizeEx(FResourceSizeEx &CumulativeResourceSize)
Definition Obj.cpp:2681
DECLARE_FUNCTION(execNothingInt32)
DECLARE_FUNCTION(execLetBool)
DECLARE_FUNCTION(execNothing)
DECLARE_FUNCTION(execObjectToInterface)
DECLARE_FUNCTION(execNotEqual_DelegateDelegate)
DECLARE_FUNCTION(execLetDelegate)
DECLARE_FUNCTION(execSetConst)
DECLARE_FUNCTION(execMapConst)
DECLARE_FUNCTION(execInterfaceToObject)
DECLARE_FUNCTION(execPropertyConst)
DECLARE_FUNCTION(execDoubleToFloatCast)
DECLARE_FUNCTION(execSelf)
TReturnType * CreateEditorOnlyDefaultSubobject(FName SubobjectName, bool bTransient=false)
Definition Object.h:134
UE_FORCEINLINE_HINT bool IsCapturingAsRootObjectForTransaction() const
Definition Object.h:318
DECLARE_FUNCTION(execArrayConst)
virtual void PreDuplicate(FObjectDuplicationParameters &DupParams)
Definition Object.h:532
DECLARE_FUNCTION(execDynArrayRemoveItem)
DECLARE_FUNCTION(execSetDynArrayElement)
friend COREUOBJECT_API UClass * Z_Construct_UClass_UObject_NoRegister()
DECLARE_FUNCTION(execEmptyParmValue)
DECLARE_FUNCTION(execAddMulticastDelegate)
virtual FString GetDesc()
Definition Object.h:704
DECLARE_FUNCTION(execContext)
DECLARE_FUNCTION(execGetDynArrayElement)
DECLARE_FUNCTION(execLetMulticastDelegate)
virtual COREUOBJECT_API void Serialize(FArchive &Ar)
DECLARE_FUNCTION(execMetaCast)
virtual bool NeedsLoadForEditorGame() const
Definition Object.h:583
virtual void PostCDOContruct()
Definition Object.h:234
DECLARE_FUNCTION(execEndOfScript)
DECLARE_FUNCTION(execFalse)
virtual void OverridePerObjectConfigSection(FString &SectionName)
Definition Object.h:1409
virtual void ExportCustomProperties(FOutputDevice &Out, uint32 Indent)
Definition Object.h:668
DECLARE_FUNCTION(execSetDynArrayLength)
DECLARE_FUNCTION(execInterfaceVariable)
virtual void ValidateGeneratedRepEnums(const TArray< struct FRepRecord > &ClassReps) const
Definition Object.h:1807
virtual void ShutdownAfterError()
Definition Object.h:420
DECLARE_FUNCTION(execBreakpoint)
DECLARE_FUNCTION(execRemoveMulticastDelegate)
DECLARE_FUNCTION(execCallMathFunction)
DECLARE_FUNCTION(execEqualEqual_DelegateDelegate)
DECLARE_FUNCTION(execNameConst)
virtual const TCHAR * GetConfigOverridePlatform() const
Definition Object.h:1395
DECLARE_FUNCTION(execLocalVariable)
DECLARE_FUNCTION(execAssert)
DECLARE_FUNCTION(execFloatToDoubleCast)
DECLARE_FUNCTION(execFloatConst)
DECLARE_FUNCTION(execTracepoint)
UE_FORCEINLINE_HINT bool Modify(bool bAlwaysMarkDirty=true)
Definition Object.h:317
virtual uint64 GetNetPushIdDynamic() const
Definition Object.h:1825
DECLARE_FUNCTION(execIntConstByte)
DECLARE_FUNCTION(execDynArrayFind)
DECLARE_FUNCTION(execJump)
virtual bool HasNonEditorOnlyReferences() const
Definition Object.h:604
DECLARE_FUNCTION(execDynArrayInsertItem)
DECLARE_FUNCTION(execUInt64Const)
DECLARE_FUNCTION(execNativeParm)
DECLARE_FUNCTION(execLetObj)
DECLARE_FUNCTION(ProcessInternal)
TReturnType * CreateDefaultSubobject(FName SubobjectName, bool bTransient=false)
Definition Object.h:161
DECLARE_FUNCTION(execTextConst)
DECLARE_FUNCTION(execUnicodeStringConst)
DECLARE_FUNCTION(execLocalOutVariable)
DECLARE_FUNCTION(execDynArrayFindStruct)
DECLARE_FUNCTION(execClassSparseDataVariable)
DECLARE_FUNCTION(execTrue)
DECLARE_FUNCTION(execRotationConst)
virtual bool IsReadyForAsyncPostLoad() const
Definition Object.h:345
DECLARE_FUNCTION(execLet)
DECLARE_FUNCTION(execInterfaceCast)
static UE_API void AddReferencedObjects(UObject *InThis, FReferenceCollector &Collector)
Definition World.cpp:982
virtual UE_API UWorld * GetWorld() const override
Definition World.cpp:1820
Type
Definition Object.h:60
@ NullChecked
Definition Object.h:64
@ NullAllowed
Definition Object.h:62
Type
Definition UObjectGlobals.h:128
@ PIE
Definition UObjectGlobals.h:134
@ AssetData
Definition TokenizedMessage.h:40
@ Suffix
Definition MirrorDataTable.h:34
Type
Definition ResourceSize.h:18
Definition OverriddenPropertySet.cpp:45
Definition PropertyNames.h:7
Definition TestUtils.cpp:8
Definition PackageReader.h:15
Definition ConfigAccessTracking.h:154
Definition CookOnTheFly.h:19
Definition NetworkVersion.cpp:28
EFragmentRegistrationFlags
Definition ReplicationFragment.h:220
@ DisplayName
[ClassMetadata] [PropertyMetadata] [FunctionMetadata] The name to display for this class,...
Definition ObjectMacros.h:1240
@ false
Definition radaudio_common.h:23
Definition ArchiveCookContext.h:14
Definition AssetData.h:162
static bool CheckObjectValidBasedOnItsFlags(const UObject *Test)
Definition Object.h:1846
Definition UObjectGlobals.h:147
friend struct FNetObjectManagerPushIdHelper
Definition Object.h:1835
friend struct FNetPrivatePushIdHelper
Definition Object.h:1834
friend struct UE::Net::Private::FNetHandleLegacyPushModelHelper
Definition Object.h:1836
Definition PrimaryAssetId.h:126
Definition UnrealType.h:7001
Definition UnrealType.h:6865
Definition ResourceSize.h:31
Definition TopLevelAssetPath.h:38
UE_FORCEINLINE_HINT bool HasAnyFlags(EInternalObjectFlags InFlags) const
Definition UObjectArray.h:309
Definition UObjectMigrationContext.h:62
ETagDisplay
Definition Object.h:845
FName Name
Definition Object.h:859
FAssetRegistryTag(FName InName, FString &&InValue, ETagType InType, uint32 InDisplayFlags=TD_None)
Definition Object.h:873
FAssetRegistryTag()=default
FString Value
Definition Object.h:862
FAssetRegistryTag(FName InName, const FString &InValue, ETagType InType, uint32 InDisplayFlags=TD_None)
Definition Object.h:871
ETagType
Definition Object.h:830
@ TT_Hidden
Definition Object.h:832
@ TT_Dimensional
Definition Object.h:838
@ TT_Chronological
Definition Object.h:840
@ TT_Numerical
Definition Object.h:836
@ TT_Alphabetical
Definition Object.h:834
FString Filename
Definition Object.h:1315
FString OverrideConfigSectionName
Definition Object.h:1321