UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UObjectBaseUtility Class Reference

#include <UObjectBaseUtility.h>

+ Inheritance diagram for UObjectBaseUtility:

Public Member Functions

 UObjectBaseUtility ()
 
 UObjectBaseUtility (EObjectFlags InFlags)
 
void SetFlags (EObjectFlags NewFlags)
 
void ClearFlags (EObjectFlags FlagsToClear)
 
bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 
bool HasAllFlags (EObjectFlags FlagsToCheck) const
 
UE_FORCEINLINE_HINT EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 
UE_FORCEINLINE_HINT void Mark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT void UnMark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAnyMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAllMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT EObjectMark GetAllMarks () const
 
void MarkAsGarbage ()
 
void ClearGarbage ()
 
UE_FORCEINLINE_HINT void AddToRoot ()
 
UE_FORCEINLINE_HINT void RemoveFromRoot ()
 
UE_FORCEINLINE_HINT bool IsRooted () const
 
UE_FORCEINLINE_HINT int32 GetRefCount () const
 
bool ThisThreadAtomicallyClearedRFUnreachable ()
 
UE_FORCEINLINE_HINT bool IsUnreachable () const
 
UE_FORCEINLINE_HINT bool IsNative () const
 
void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 
UE_FORCEINLINE_HINT EInternalObjectFlags GetInternalFlags () const
 
UE_FORCEINLINE_HINT bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 
void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
COREUOBJECT_API FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (FStringBuilderBase &ResultString, const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API FString GetPathName (const UObject *StopOuter=NULL) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FString &ResultString) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FStringBuilderBase &ResultString) const
 
virtual bool CanBeClusterRoot () const
 
virtual COREUOBJECT_API bool CanBeInCluster () const
 
virtual COREUOBJECT_API void CreateCluster ()
 
virtual void OnClusterMarkedAsPendingKill ()
 
COREUOBJECT_API void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 
COREUOBJECT_API FString GetFullGroupName (bool bStartWithOuter) const
 
UE_FORCEINLINE_HINT FString GetName () const
 
UE_FORCEINLINE_HINT void GetName (FString &ResultString) const
 
UE_FORCEINLINE_HINT void AppendName (FString &ResultString) const
 
COREUOBJECT_API bool IsPackageExternal () const
 
COREUOBJECT_API void DetachExternalPackage ()
 
COREUOBJECT_API void ReattachExternalPackage ()
 
COREUOBJECT_API UObjectGetOutermostObject () const
 
COREUOBJECT_API UPackageGetPackage () const
 
UE_INTERNAL virtual COREUOBJECT_API UE::Core::FVersePath GetVersePath () const
 
COREUOBJECT_API UPackageGetOutermost () const
 
COREUOBJECT_API bool MarkPackageDirty () const
 
COREUOBJECT_API bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 
COREUOBJECT_API UObjectGetTypedOuter (UClass *Target) const
 
template<typename T >
T * GetTypedOuter () const
 
template<typename InterfaceClassType >
InterfaceClassTypeGetImplementingOuter () const
 
COREUOBJECT_API UObjectBaseUtilityGetImplementingOuterObject (const UClass *InInterfaceClass) const
 
COREUOBJECT_API bool IsIn (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsIn (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInOuter (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsInPackage (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInA (const UClass *SomeBaseClass) const
 
COREUOBJECT_API bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 
template<typename OtherClassType >
bool IsA (OtherClassType SomeBase) const
 
template<class T >
bool IsA () const
 
COREUOBJECT_API const UClassFindNearestCommonBaseClass (const UClass *TestClass) const
 
COREUOBJECT_API voidGetInterfaceAddress (UClass *InterfaceClass)
 
COREUOBJECT_API voidGetNativeInterfaceAddress (UClass *InterfaceClass)
 
const voidGetNativeInterfaceAddress (UClass *InterfaceClass) const
 
COREUOBJECT_API bool IsTemplateForSubobjects (EObjectFlags TemplateTypes=RF_ClassDefaultObject|RF_DefaultSubObject|RF_InheritableComponentTemplate) const
 
COREUOBJECT_API bool IsDefaultSubobject () const
 
COREUOBJECT_API class FLinkerLoadGetLinker () const
 
COREUOBJECT_API int32 GetLinkerIndex () const
 
COREUOBJECT_API FPackageFileVersion GetLinkerUEVersion () const
 
int32 GetLinkerUE4Version () const
 
COREUOBJECT_API int32 GetLinkerLicenseeUEVersion () const
 
int32 GetLinkerLicenseeUE4Version () const
 
COREUOBJECT_API int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 
UE_FORCEINLINE_HINT bool operator< (const UObjectBaseUtility &Other) const
 
TStatId GetStatID (bool bForDeferredUse=false) const
 
- Public Member Functions inherited from UObjectBase
COREUOBJECT_API UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName, int32 InInternalIndex=-1, int32 InSerialNumber=0, FRemoteObjectId InRemoteId=FRemoteObjectId())
 
virtual COREUOBJECT_API ~UObjectBase ()
 
COREUOBJECT_API bool IsValidLowLevel () const
 
COREUOBJECT_API bool IsValidLowLevelFast (bool bRecursive=true) const
 
FORCEINLINE uint32 GetUniqueID () const
 
FORCEINLINE UClassGetClass () const
 
FORCEINLINE UObjectGetOuter () const
 
FORCEINLINE FName GetFName () const
 
virtual COREUOBJECT_API FName GetFNameForStatID () const
 
COREUOBJECT_API UPackageGetExternalPackage () const
 
COREUOBJECT_API void SetExternalPackage (UPackage *InPackage)
 
COREUOBJECT_API UPackageGetExternalPackageInternal () const
 
COREUOBJECT_API void MarkAsReachable () const
 
COREUOBJECT_API void AddRef () const
 
COREUOBJECT_API void ReleaseRef () const
 
FORCEINLINE EObjectFlags GetFlags () const
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 

Static Public Member Functions

static bool IsGarbageEliminationEnabled ()
 
static bool IsPendingKillEnabled ()
 
static void SetGarbageEliminationEnabled (bool bEnabled)
 
static COREUOBJECT_API void ReloadObjectsFromModifiedConfigSections (const class FConfigModificationTracker *ChangeTracker)
 
- Static Public Member Functions inherited from UObjectBase
static COREUOBJECT_API FString RemoveClassPrefix (const TCHAR *ClassName)
 
static void PrefetchClass (UObject *Object)
 
static void PrefetchOuter (UObject *Object)
 

Friends

struct FInternalUObjectBaseUtilityIsValidFlagsChecker
 
void InitGarbageElimination ()
 

Additional Inherited Members

- Protected Member Functions inherited from UObjectBase
 UObjectBase ()
 
COREUOBJECT_API UObjectBase (EObjectFlags InFlags)
 
COREUOBJECT_API void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 
virtual void RegisterDependencies ()
 
COREUOBJECT_API void Register (class UClass *(*StaticClassFn)(), const TCHAR *PackageName, const TCHAR *Name)
 
COREUOBJECT_API void Register (const TCHAR *PackageName, const TCHAR *Name)
 
virtual COREUOBJECT_API void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Detailed Description

Provides utility functions for UObject, this class should not be used directly

Constructor & Destructor Documentation

◆ UObjectBaseUtility() [1/2]

UObjectBaseUtility::UObjectBaseUtility ( )
inline

◆ UObjectBaseUtility() [2/2]

UObjectBaseUtility::UObjectBaseUtility ( EObjectFlags  InFlags)
inline

Member Function Documentation

◆ AddToCluster()

UE_AUTORTFM_ALWAYS_OPEN void UObjectBaseUtility::AddToCluster ( UObjectBaseUtility ClusterRootOrObjectFromCluster,
bool  bAddAsMutableObject = false 
)

Adds this objects to a GC cluster that already exists

Parameters
ClusterRootOrObjectFromClusterObject that belongs to the cluster we want to add this object to.
Addthis object to the target cluster as a mutable object without adding this object's references.

◆ AddToRoot()

UE_FORCEINLINE_HINT void UObjectBaseUtility::AddToRoot ( )
inline

Add an object to the root set. This prevents the object and all its descendants from being deleted during garbage collection.

◆ AppendName()

UE_FORCEINLINE_HINT void UObjectBaseUtility::AppendName ( FString &  ResultString) const
inline

Optimized version of GetName that appends to an existing string

◆ AtomicallyClearInternalFlags()

bool UObjectBaseUtility::AtomicallyClearInternalFlags ( EInternalObjectFlags  FlagsToClear) const
inline

Atomically clears passed in internal flags.

Parameters
FlagsToClearObject flags to clear.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ CanBeClusterRoot()

virtual bool UObjectBaseUtility::CanBeClusterRoot ( ) const
inlinevirtual

Called after load to determine if the object can be a cluster root

Returns
true if this object can be a cluster root

Reimplemented in UBlueprintGeneratedClass, ULevel, UStaticMesh, UParticleSystem, USoundBase, USoundCue, USoundNode, and UMaterial.

◆ CanBeInCluster()

bool UObjectBaseUtility::CanBeInCluster ( ) const
virtual

Called during cluster construction if the object can be added to a cluster

Returns
true if this object can be inside of a cluster

Reimplemented in AActor, USoundBase, USoundCue, USoundNode, UMaterialParameterCollection, and UMediaPlaylist.

◆ ClearFlags()

void UObjectBaseUtility::ClearFlags ( EObjectFlags  FlagsToClear)
inline

Clears subset of flags for a specific object

◆ ClearGarbage()

void UObjectBaseUtility::ClearGarbage ( )
inline

Unmarks this object as Garbage.

◆ ClearInternalFlags()

void UObjectBaseUtility::ClearInternalFlags ( EInternalObjectFlags  FlagsToClear) const
inline

Clears passed in internal flags.

Parameters
FlagsToClearObject flags to clear.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ CreateCluster()

void UObjectBaseUtility::CreateCluster ( )
virtual

Called after PostLoad to create UObject cluster

Reimplemented in ULevel, and ULevelActorContainer.

◆ DetachExternalPackage()

void UObjectBaseUtility::DetachExternalPackage ( )

Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached

◆ FindNearestCommonBaseClass()

const UClass * UObjectBaseUtility::FindNearestCommonBaseClass ( const UClass TestClass) const

Finds the most-derived class which is a parent of both TestClass and this object's class.

Parameters
TestClassthe class to find the common base for

◆ GetAllMarks()

UE_FORCEINLINE_HINT EObjectMark UObjectBaseUtility::GetAllMarks ( ) const
inline

Returns all of the object marks on a specific object

Parameters
ObjectObject to get marks for
Returns
all Marks for an object

◆ GetFullGroupName()

FString UObjectBaseUtility::GetFullGroupName ( bool  bStartWithOuter) const

Walks up the chain of packages until it reaches the top level, which it ignores.

Parameters
bStartWithOuterwhether to include this object's name in the returned string
Returns
string containing the path name for this object, minus the outermost-package's name

◆ GetFullName() [1/3]

void UObjectBaseUtility::GetFullName ( const UObject StopOuter,
FString &  ResultString,
EObjectFullNameFlags  Flags = EObjectFullNameFlags::None 
) const

Version of GetFullName() that eliminates unnecessary copies.

Version of GetFullName() that eliminates unnecessary copies and appends an existing string.

◆ GetFullName() [2/3]

FString UObjectBaseUtility::GetFullName ( const UObject StopOuter = NULL,
EObjectFullNameFlags  Flags = EObjectFullNameFlags::None 
) const

Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'.

Parameters
StopOuterif specified, indicates that the output string should be relative to this object. if StopOuter does not exist in this object's Outer chain, the result would be the same as passing NULL.
Flagsflags that control the behavior of full name generation
Note
safe to call on NULL object pointers!

Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost.[Outer:]Name'.

Parameters
StopOuterif specified, indicates that the output string should be relative to this object. if StopOuter does not exist in this object's Outer chain, the result would be the same as passing NULL.
Note
safe to call on NULL object pointers!

◆ GetFullName() [3/3]

void UObjectBaseUtility::GetFullName ( FStringBuilderBase ResultString,
const UObject StopOuter = NULL,
EObjectFullNameFlags  Flags = EObjectFullNameFlags::None 
) const

Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'.

Parameters
ResultStringStringBuilder to populate
StopOuterif specified, indicates that the output string should be relative to this object. if StopOuter does not exist in this object's Outer chain, the result would be the same as passing NULL.
Flagsflags that control the behavior of full name generation
Note
safe to call on NULL object pointers!

◆ GetImplementingOuter()

InterfaceClassType * UObjectBaseUtility::GetImplementingOuter ( ) const
inline

Traverses the outer chain looking for the next object that implements the specified IInterface (InterfaceClass must be an IInterface)

Returns
a pointer to the interface on the first object in this object's Outer chain which implements the specified interface.

◆ GetImplementingOuterObject()

UObjectBaseUtility * UObjectBaseUtility::GetImplementingOuterObject ( const UClass InInterfaceClass) const

Traverses the outer chain looking for the next object that implements the specified UInterface (InInterfaceClass must be a subclass of UInterface)

Parameters
InInterfaceClassTarget interface to search for
Returns
a pointer to the first object in this object's Outer chain which implements the specified interface.

◆ GetInterfaceAddress()

void * UObjectBaseUtility::GetInterfaceAddress ( UClass InterfaceClass)

Returns a pointer to this object safely converted to a pointer of the specified interface class.

Parameters
InterfaceClassthe interface class to use for the returned type
Returns
a pointer that can be assigned to a variable of the interface type specified, or NULL if this object's class doesn't implement the interface indicated. Will be the same value as 'this' if the interface class isn't native.

Returns a pointer to this object safely converted to a pointer to the specified interface class.

Parameters
InterfaceClassthe interface class to use for the returned type
Returns
a pointer that can be assigned to a variable of the interface type specified, or NULL if this object's class doesn't implement the interface indicated. Will be the same value as 'this' if the interface class isn't native.

◆ GetInternalFlags()

UE_FORCEINLINE_HINT EInternalObjectFlags UObjectBaseUtility::GetInternalFlags ( ) const
inline

Gets internal flags.

Parameters
FlagsToClearObject flags to clear.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ GetLinker()

FLinkerLoad * UObjectBaseUtility::GetLinker ( ) const

Returns the linker for this object.

Returns
a pointer to the linker for this object, or NULL if this object has no linker

◆ GetLinkerCustomVersion()

int32 UObjectBaseUtility::GetLinkerCustomVersion ( FGuid  CustomVersionKey) const

Returns the custom version of the linker for this object corresponding to the given custom version key.

Returns
the custom version of the engine's package file when this object was last saved, or the current version if this object does not have a linker, which indicates that a) this object is a native only class, or b) this object's linker has been detached, in which case it is already fully loaded

◆ GetLinkerIndex()

int32 UObjectBaseUtility::GetLinkerIndex ( ) const

Returns this object's LinkerIndex.

Returns
the index into my linker's ExportMap for the FObjectExport corresponding to this object.

◆ GetLinkerLicenseeUE4Version()

int32 UObjectBaseUtility::GetLinkerLicenseeUE4Version ( ) const
inline

◆ GetLinkerLicenseeUEVersion()

int32 UObjectBaseUtility::GetLinkerLicenseeUEVersion ( ) const

Returns the licensee version of the linker for this object.

Returns
the licensee version of the engine's package file when this object was last saved, or GPackageFileLicenseeVersion (current version) if this object does not have a linker, which indicates that a) this object is a native only class, or b) this object's linker has been detached, in which case it is already fully loaded

◆ GetLinkerUE4Version()

int32 UObjectBaseUtility::GetLinkerUE4Version ( ) const
inline

◆ GetLinkerUEVersion()

FPackageFileVersion UObjectBaseUtility::GetLinkerUEVersion ( ) const

Returns the UE version of the linker for this object.

Returns
the UE version of the engine's package file when this object was last saved, or GPackageFileUEVersion (current version) if this object does not have a linker, which indicates that a) this object is a native only class, or b) this object's linker has been detached, in which case it is already fully loaded

Returns the UE version of the linker for this object.

Returns
the UEversion of the engine's package file when this object was last saved, or GPackageFileUEVersion (current version) if this object does not have a linker, which indicates that a) this object is a native only class, or b) this object's linker has been detached, in which case it is already fully loaded

◆ GetMaskedFlags()

UE_FORCEINLINE_HINT EObjectFlags UObjectBaseUtility::GetMaskedFlags ( EObjectFlags  Mask = RF_AllFlags) const
inline

Returns object flags that are both in the mask and set on the object.

Parameters
MaskMask to mask object flags with
Objectsflags that are set in both the object and the mask

◆ GetName() [1/2]

UE_FORCEINLINE_HINT FString UObjectBaseUtility::GetName ( ) const
inline

Returns the name of this object (with no path information)

Returns
Name of the object.

◆ GetName() [2/2]

UE_FORCEINLINE_HINT void UObjectBaseUtility::GetName ( FString &  ResultString) const
inline

Optimized version of GetName that overwrites an existing string

◆ GetNativeInterfaceAddress() [1/2]

void * UObjectBaseUtility::GetNativeInterfaceAddress ( UClass InterfaceClass)

Returns a pointer to the I* native interface object that this object implements. Returns NULL if this object does not implement InterfaceClass, or does not do so natively.

◆ GetNativeInterfaceAddress() [2/2]

const void * UObjectBaseUtility::GetNativeInterfaceAddress ( UClass InterfaceClass) const
inline

Returns a pointer to the const I* native interface object that this object implements. Returns NULL if this object does not implement InterfaceClass, or does not do so natively.

◆ GetOutermost()

UPackage * UObjectBaseUtility::GetOutermost ( ) const

Legacy function, has the same behavior as GetPackage use GetPackage instead.

Returns
the package the object is in.
See also
GetPackage

◆ GetOutermostObject()

UObject * UObjectBaseUtility::GetOutermostObject ( ) const

Walks up the list of outers until it finds the top-level one that isn't a package. Will return null if called on a package

Returns
outermost non package Outer.

Walks up the list of outers until it finds the top-level one that isn't a package. Will return null if called on a package

Returns
outermost non-null, non-package Outer.

◆ GetPackage()

UPackage * UObjectBaseUtility::GetPackage ( ) const

Walks up the list of outers until it finds a package directly associated with the object.

Returns
the package the object is in.

◆ GetPathName() [1/3]

void UObjectBaseUtility::GetPathName ( const UObject StopOuter,
FString &  ResultString 
) const

Versions of GetPathName() that eliminates unnecessary copies and allocations.

Version of GetPathName() that eliminates unnecessary copies and appends an existing string.

◆ GetPathName() [2/3]

void UObjectBaseUtility::GetPathName ( const UObject StopOuter,
FStringBuilderBase ResultString 
) const

◆ GetPathName() [3/3]

FString UObjectBaseUtility::GetPathName ( const UObject StopOuter = NULL) const

Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name'

Parameters
StopOuterif specified, indicates that the output string should be relative to this object. if StopOuter does not exist in this object's Outer chain, the result would be the same as passing NULL.
Note
safe to call on NULL object pointers!

Returns the fully qualified pathname for this object, in the format: 'Outermost.[Outer:]Name'

Parameters
StopOuterif specified, indicates that the output string should be relative to this object. if StopOuter does not exist in this object's Outer chain, the result would be the same as passing NULL.
Note
safe to call on NULL object pointers!

◆ GetRefCount()

UE_FORCEINLINE_HINT int32 UObjectBaseUtility::GetRefCount ( ) const
inline

Returns the refcount of the object

Returns
the refcount of the object.

◆ GetStatID()

TStatId UObjectBaseUtility::GetStatID ( bool  bForDeferredUse = false) const
inline

Returns the stat ID of the object, used for profiling. This will create a stat ID if needed.

Parameters
bForDeferredIf true, a stat ID will be created even if a group is disabled

◆ GetTypedOuter() [1/2]

template<typename T >
T * UObjectBaseUtility::GetTypedOuter ( ) const
inline

Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)

Returns
a pointer to the first object in this object's Outer chain which is of the correct type.

◆ GetTypedOuter() [2/2]

UObject * UObjectBaseUtility::GetTypedOuter ( UClass Target) const

Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)

Parameters
Targetclass to search for
Returns
a pointer to the first object in this object's Outer chain which is of the correct type.

◆ GetVersePath()

UE::Core::FVersePath UObjectBaseUtility::GetVersePath ( ) const
virtual

Gets the versepath of the UObject.

Returns
The VersePath of the object

Reimplemented in UVerseClass, and UBlueprintGeneratedClass.

◆ HasAllFlags()

bool UObjectBaseUtility::HasAllFlags ( EObjectFlags  FlagsToCheck) const
inline

Used to safely check whether all of the passed in flags are set.

Parameters
FlagsToCheckObject flags to check for
Returns
true if all of the passed in flags are set (including no flags passed in), false otherwise

◆ HasAllMarks()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::HasAllMarks ( EObjectMark  Marks) const
inline

Tests an object for having ALL of a set of marks

Parameters
MarksLogical OR of OBJECTMARK_'s to test
Returns
true if the object has any of the given marks.

◆ HasAnyFlags()

bool UObjectBaseUtility::HasAnyFlags ( EObjectFlags  FlagsToCheck) const
inline

Used to safely check whether any of the passed in flags are set.

Parameters
FlagsToCheckObject flags to check for.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ HasAnyInternalFlags()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::HasAnyInternalFlags ( EInternalObjectFlags  FlagsToCheck) const
inline

Used to safely check whether any of the passed in internal flags are set.

Parameters
FlagsToCheckObject flags to check for.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ HasAnyMarks()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::HasAnyMarks ( EObjectMark  Marks) const
inline

Tests an object for having ANY of a set of marks

Parameters
MarksLogical OR of OBJECTMARK_'s to test
Returns
true if the object has any of the given marks.

◆ IsA() [1/2]

template<class T >
bool UObjectBaseUtility::IsA ( ) const
inline

Returns true if this object is of the template type.

◆ IsA() [2/2]

bool UObjectBaseUtility::IsA ( OtherClassType  SomeBase) const
inline

Returns true if this object is of the specified type.

Parameters
SomeBaseThe base class to check against, UClass* assignable. Cannot be null.

◆ IsDefaultSubobject()

bool UObjectBaseUtility::IsDefaultSubobject ( ) const

Returns whether this is a subobject (template or instance) that was originally defined inside a default class object. This will return true for all instanced objects created from an archetype that is not a class default object, but will only return true for template objects nested directly inside a class default object.

Warning
The behavior of this function is inconsistent for historical reasons and is not equivalent to RF_DefaultSubobject. Call IsTemplateSubobject to handle all types of subobject templates, or call GetArchetype() first if you have an instance.
Returns
true if this was instanced from a subobject template, or is the direct subobject of a class default object

◆ IsGarbageEliminationEnabled()

static bool UObjectBaseUtility::IsGarbageEliminationEnabled ( )
inlinestatic

Helper function to access the private bGarbageEliminationEnabled variable

◆ IsIn() [1/2]

bool UObjectBaseUtility::IsIn ( const UObject SomeOuter) const

Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. Legacy function, preferably use IsInOuter or IsInPackage depending on use case.

Returns
true if the specified object appears somewhere in this object's outer chain.

◆ IsIn() [2/2]

bool UObjectBaseUtility::IsIn ( const UPackage SomePackage) const

Overload to determine if an object is in the specified package which can now be different than its outer chain. Calls IsInPackage.

Overload to determine if an object is in the specified package which can now be different than its outer chain.

◆ IsInA()

bool UObjectBaseUtility::IsInA ( const UClass SomeBaseClass) const

Find out if this object is inside (has an outer) that is of the specified class

Parameters
SomeBaseClassThe base class to compare against
Returns
True if this object is in an object of the given type.

◆ IsInOuter()

bool UObjectBaseUtility::IsInOuter ( const UObject SomeOuter) const

Returns true if the object is contained in the specified outer.

◆ IsInPackage()

bool UObjectBaseUtility::IsInPackage ( const UPackage SomePackage) const

Returns true if the object is contained in the specified package.

Returns
true if the object is contained in the specified package.

◆ IsNative()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::IsNative ( ) const
inline

Checks if the object is native.

◆ IsPackageExternal()

bool UObjectBaseUtility::IsPackageExternal ( ) const

Get the object packaging mode.

Returns
true if object has a different package than its outer's package

◆ IsPendingKillEnabled()

static bool UObjectBaseUtility::IsPendingKillEnabled ( )
inlinestatic

◆ IsRooted()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::IsRooted ( ) const
inline

Returns true if this object is explicitly rooted

Returns
true if the object was explicitly added as part of the root set.

◆ IsTemplate()

bool UObjectBaseUtility::IsTemplate ( EObjectFlags  TemplateTypes = RF_ArchetypeObject|RF_ClassDefaultObject) const

Determines whether this object is a template object by checking flags on the object and the outer chain.

Parameters
TemplateTypesSpecific flags to look for, the default checks class default and non-class templates
Returns
true if this object is a template object that can be used as an archetype

Determines whether this object is a template object

Returns
true if this object is a template object (owned by a UClass)

◆ IsTemplateForSubobjects()

bool UObjectBaseUtility::IsTemplateForSubobjects ( EObjectFlags  TemplateTypes = RF_ClassDefaultObject|RF_DefaultSubObject|RF_InheritableComponentTemplate) const

Returns whether this is a template that can be used to create instanced subobjects. By default this includes subobjects of a class default object and other templates associated with a class.

Parameters
TemplateTypesSpecific flags to check on this object and the outer chain
Returns
true if this is a template for creating instanced subobjects

◆ IsUnreachable()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::IsUnreachable ( ) const
inline

Checks if the object is unreachable.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

◆ Mark()

UE_FORCEINLINE_HINT void UObjectBaseUtility::Mark ( EObjectMark  Marks) const
inline

Adds marks to an object

Parameters
MarksLogical OR of OBJECTMARK_'s to apply

◆ MarkAsGarbage()

void UObjectBaseUtility::MarkAsGarbage ( )
inline

Marks this object as Garbage.

◆ MarkPackageDirty()

bool UObjectBaseUtility::MarkPackageDirty ( ) const

Finds the outermost package and marks it dirty. The editor suppresses this behavior during load as it is against policy to dirty packages simply by loading them.

Returns
false if the request to mark the package dirty was suppressed by the editor and true otherwise.

Finds the outermost package and marks it dirty

◆ OnClusterMarkedAsPendingKill()

virtual void UObjectBaseUtility::OnClusterMarkedAsPendingKill ( )
inlinevirtual

Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it.

Reimplemented in ULevelActorContainer.

◆ operator<()

UE_FORCEINLINE_HINT bool UObjectBaseUtility::operator< ( const UObjectBaseUtility Other) const
inline

Overloaded < operator. Compares objects by name.

Returns
true if this object's name is lexicographically smaller than the other object's name

◆ ReattachExternalPackage()

void UObjectBaseUtility::ReattachExternalPackage ( )

Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call

◆ ReloadObjectsFromModifiedConfigSections()

void UObjectBaseUtility::ReloadObjectsFromModifiedConfigSections ( const class FConfigModificationTracker ChangeTracker)
static

◆ RemoveFromRoot()

UE_FORCEINLINE_HINT void UObjectBaseUtility::RemoveFromRoot ( )
inline

Remove an object from the root set.

◆ RootPackageHasAnyFlags()

bool UObjectBaseUtility::RootPackageHasAnyFlags ( uint32  CheckFlagMask) const

Checks whether this object's top-most package has any of the specified flags

Parameters
CheckFlagMaska bitmask of EPackageFlags values to check for
Returns
true if the PackageFlags member of this object's top-package has any bits from the mask set.

◆ SetFlags()

void UObjectBaseUtility::SetFlags ( EObjectFlags  NewFlags)
inline

Modifies object flags for a specific object

◆ SetGarbageEliminationEnabled()

static void UObjectBaseUtility::SetGarbageEliminationEnabled ( bool  bEnabled)
inlinestatic

Helper function to set the private bGarbageEliminationEnabled variable.

◆ SetInternalFlags()

void UObjectBaseUtility::SetInternalFlags ( EInternalObjectFlags  FlagsToSet) const
inline

Clears passed in internal flags.

Parameters
FlagsToClearObject flags to clear.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ ThisThreadAtomicallyClearedRFUnreachable()

bool UObjectBaseUtility::ThisThreadAtomicallyClearedRFUnreachable ( )

Atomically clear the unreachable flag

Returns
true if we are the thread that cleared RF_Unreachable

◆ UnMark()

UE_FORCEINLINE_HINT void UObjectBaseUtility::UnMark ( EObjectMark  Marks) const
inline

Removes marks from and object

Parameters
MarksLogical OR of OBJECTMARK_'s to remove

Friends And Related Symbol Documentation

◆ FInternalUObjectBaseUtilityIsValidFlagsChecker

◆ InitGarbageElimination

void InitGarbageElimination ( )
friend

The documentation for this class was generated from the following files: