![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UObjectBaseUtility.h>
Inheritance diagram for UObjectBaseUtility: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) |
Provides utility functions for UObject, this class should not be used directly
|
inline |
|
inline |
| UE_AUTORTFM_ALWAYS_OPEN void UObjectBaseUtility::AddToCluster | ( | UObjectBaseUtility * | ClusterRootOrObjectFromCluster, |
| bool | bAddAsMutableObject = false |
||
| ) |
Adds this objects to a GC cluster that already exists
| ClusterRootOrObjectFromCluster | Object that belongs to the cluster we want to add this object to. |
| Add | this object to the target cluster as a mutable object without adding this object's references. |
|
inline |
Add an object to the root set. This prevents the object and all its descendants from being deleted during garbage collection.
|
inline |
Optimized version of GetName that appends to an existing string
|
inline |
Atomically clears passed in internal flags.
| FlagsToClear | Object flags to clear. |
Called after load to determine if the object can be a cluster root
Reimplemented in UBlueprintGeneratedClass, ULevel, UStaticMesh, UParticleSystem, USoundBase, USoundCue, USoundNode, and UMaterial.
|
virtual |
Called during cluster construction if the object can be added to a cluster
Reimplemented in AActor, USoundBase, USoundCue, USoundNode, UMaterialParameterCollection, and UMediaPlaylist.
|
inline |
Clears subset of flags for a specific object
|
inline |
Unmarks this object as Garbage.
|
inline |
Clears passed in internal flags.
| FlagsToClear | Object flags to clear. |
|
virtual |
Called after PostLoad to create UObject cluster
Reimplemented in ULevel, and ULevelActorContainer.
| void UObjectBaseUtility::DetachExternalPackage | ( | ) |
Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
Finds the most-derived class which is a parent of both TestClass and this object's class.
| TestClass | the class to find the common base for |
|
inline |
Returns all of the object marks on a specific object
| Object | Object to get marks for |
| FString UObjectBaseUtility::GetFullGroupName | ( | bool | bStartWithOuter | ) | const |
Walks up the chain of packages until it reaches the top level, which it ignores.
| bStartWithOuter | whether to include this object's name in the returned string |
| 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.
| 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'.
| StopOuter | if 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. |
| Flags | flags that control the behavior of full name generation |
Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost.[Outer:]Name'.
| StopOuter | if 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. |
| 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'.
| ResultString | StringBuilder to populate |
| StopOuter | if 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. |
| Flags | flags that control the behavior of full name generation |
|
inline |
Traverses the outer chain looking for the next object that implements the specified IInterface (InterfaceClass must be an IInterface)
| 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)
| InInterfaceClass | Target interface to search for |
Returns a pointer to this object safely converted to a pointer of the specified interface class.
| InterfaceClass | the interface class to use for the returned type |
Returns a pointer to this object safely converted to a pointer to the specified interface class.
| InterfaceClass | the interface class to use for the returned type |
|
inline |
Gets internal flags.
| FlagsToClear | Object flags to clear. |
| FLinkerLoad * UObjectBaseUtility::GetLinker | ( | ) | const |
Returns the linker for this object.
Returns the custom version of the linker for this object corresponding to the given custom version key.
| int32 UObjectBaseUtility::GetLinkerIndex | ( | ) | const |
Returns this object's LinkerIndex.
|
inline |
| int32 UObjectBaseUtility::GetLinkerLicenseeUEVersion | ( | ) | const |
Returns the licensee version of the linker for this object.
|
inline |
| FPackageFileVersion UObjectBaseUtility::GetLinkerUEVersion | ( | ) | const |
Returns the UE version of the linker for this object.
Returns the UE version of the linker for this object.
|
inline |
Returns object flags that are both in the mask and set on the object.
| Mask | Mask to mask object flags with |
| Objects | flags that are set in both the object and the mask |
|
inline |
Returns the name of this object (with no path information)
|
inline |
Optimized version of GetName that overwrites an existing string
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.
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.
| UPackage * UObjectBaseUtility::GetOutermost | ( | ) | const |
Legacy function, has the same behavior as GetPackage use GetPackage instead.
| 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
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
| UPackage * UObjectBaseUtility::GetPackage | ( | ) | const |
Walks up the list of outers until it finds a package directly associated with the object.
Versions of GetPathName() that eliminates unnecessary copies and allocations.
Version of GetPathName() that eliminates unnecessary copies and appends an existing string.
| void UObjectBaseUtility::GetPathName | ( | const UObject * | StopOuter, |
| FStringBuilderBase & | ResultString | ||
| ) | const |
Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name'
| StopOuter | if 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. |
Returns the fully qualified pathname for this object, in the format: 'Outermost.[Outer:]Name'
| StopOuter | if 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. |
|
inline |
Returns the refcount of the object
Returns the stat ID of the object, used for profiling. This will create a stat ID if needed.
| bForDeferred | If true, a stat ID will be created even if a group is disabled |
|
inline |
Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)
Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)
| Target | class to search for |
|
virtual |
Gets the versepath of the UObject.
Reimplemented in UVerseClass, and UBlueprintGeneratedClass.
|
inline |
Used to safely check whether all of the passed in flags are set.
| FlagsToCheck | Object flags to check for |
|
inline |
Tests an object for having ALL of a set of marks
| Marks | Logical OR of OBJECTMARK_'s to test |
|
inline |
Used to safely check whether any of the passed in flags are set.
| FlagsToCheck | Object flags to check for. |
|
inline |
Used to safely check whether any of the passed in internal flags are set.
| FlagsToCheck | Object flags to check for. |
|
inline |
Tests an object for having ANY of a set of marks
| Marks | Logical OR of OBJECTMARK_'s to test |
|
inline |
Returns true if this object is of the template type.
|
inline |
Returns true if this object is of the specified type.
| SomeBase | The base class to check against, UClass* assignable. Cannot be null. |
| 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.
Helper function to access the private bGarbageEliminationEnabled variable
Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. Legacy function, preferably use IsInOuter or IsInPackage depending on use case.
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.
Find out if this object is inside (has an outer) that is of the specified class
| SomeBaseClass | The base class to compare against |
Returns true if the object is contained in the specified outer.
Returns true if the object is contained in the specified package.
|
inline |
Checks if the object is native.
| bool UObjectBaseUtility::IsPackageExternal | ( | ) | const |
Get the object packaging mode.
|
inline |
Returns true if this object is explicitly rooted
| 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.
| TemplateTypes | Specific flags to look for, the default checks class default and non-class templates |
Determines whether this object is a template object
| 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.
| TemplateTypes | Specific flags to check on this object and the outer chain |
|
inline |
Checks if the object is unreachable.
|
inline |
Adds marks to an object
| Marks | Logical OR of OBJECTMARK_'s to apply |
|
inline |
Marks this object as Garbage.
| 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.
Finds the outermost package and marks it dirty
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.
|
inline |
Overloaded < operator. Compares objects by name.
| 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
|
static |
|
inline |
Remove an object from the root set.
Checks whether this object's top-most package has any of the specified flags
| CheckFlagMask | a bitmask of EPackageFlags values to check for |
|
inline |
Modifies object flags for a specific object
Helper function to set the private bGarbageEliminationEnabled variable.
|
inline |
Clears passed in internal flags.
| FlagsToClear | Object flags to clear. |
| bool UObjectBaseUtility::ThisThreadAtomicallyClearedRFUnreachable | ( | ) |
Atomically clear the unreachable flag
|
inline |
Removes marks from and object
| Marks | Logical OR of OBJECTMARK_'s to remove |
|
friend |