![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UObjectBase.h>
Inheritance diagram for UObjectBase:Static Public Member Functions | |
| static COREUOBJECT_API FString | RemoveClassPrefix (const TCHAR *ClassName) |
| static void | PrefetchClass (UObject *Object) |
| static void | PrefetchOuter (UObject *Object) |
Protected Member Functions | |
| 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) |
Low level implementation of UObject, should not be used directly in game code
|
inlineprotected |
|
protected |
Constructor used for bootstrapping
| InFlags | RF_Flags to assign |
Constructor used for bootstrapping
| InClass | possibly NULL, this gives the class of the new object, if known at this time |
| InFlags | RF_Flags to assign |
| UObjectBase::UObjectBase | ( | UClass * | InClass, |
| EObjectFlags | InFlags, | ||
| EInternalObjectFlags | InInternalFlags, | ||
| UObject * | InOuter, | ||
| FName | InName, | ||
| int32 | InInternalIndex = -1, |
||
| int32 | InSerialNumber = 0, |
||
| FRemoteObjectId | InRemoteId = FRemoteObjectId() |
||
| ) |
Constructor used by StaticAllocateObject
| InClass | non NULL, this gives the class of the new object, if known at this time |
| InFlags | RF_Flags to assign |
| InInternalFlags | EInternalObjectFlags to assign |
| InOuter | outer for this object |
| InName | name of the new object |
| InInternalIndex | internal index to use (if already allocated), negative value means allocate a new index |
| InSerialNumber | serial number to re-use (if already allocated) |
Constructor used by StaticAllocateObject
| InClass | non NULL, this gives the class of the new object, if known at this time |
| InFlags | RF_Flags to assign |
| InOuter | outer for this object |
| InName | name of the new object |
| InObjectArchetype | archetype to assign |
|
virtual |
Final destructor, removes the object from the object array, and indirectly, from any annotations
| void UObjectBase::AddRef | ( | ) | const |
Increments ref-count on the object. Should always be paired with RAII (i.e. TStrongObjectPtr).
|
inline |
Atomically clears the specified flags.
|
inline |
Atomically adds the specified flags.
|
protectedvirtual |
Convert a boot-strap registered class into a real one, add to uobject array, etc
| UClassStaticClass | Now that it is known, fill in UClass::StaticClass() as the class |
Convert a boot-strap registered class into a real one, add to uobject array, etc
| UClassStaticClass | Now that it is known, fill in ClassPrivate. This is usually UClass::StaticClass. |
Reimplemented in UClass.
|
inline |
Returns the UClass that defines the fields of this object
| UPackage * UObjectBase::GetExternalPackage | ( | ) | const |
Returns the external UPackage associated with this object, if any
| UPackage * UObjectBase::GetExternalPackageInternal | ( | ) | const |
Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting.
|
inline |
Retrieve the object flags directly
|
inline |
Returns the logical name of this object
|
virtual |
Overridable method to return a logical name for identification in stats.
|
inline |
Returns the UObject this object resides in
|
inline |
Returns the unique ID of the object...these are reused so it is only unique while the object is alive. Useful as a tag.
| bool UObjectBase::IsValidLowLevel | ( | ) | const |
Checks to see if the object appears to be valid
Faster version of IsValidLowLevel. Checks to see if the object appears to be valid by checking pointers and their alignment. Name and InternalIndex checks are less accurate than IsValidLowLevel.
| bRecursive | true if the Class pointer should be checked with IsValidLowLevelFast |
Just change the FName and Outer and rehash into name hash tables. For use by higher level rename functions.
| NewName | new name for this object |
| NewOuter | new outer for this object, if NULL, outer will be unchanged |
| UE_AUTORTFM_ALWAYS_OPEN void UObjectBase::MarkAsReachable | ( | ) | const |
Marks the object as Reachable if it's currently marked as MaybeUnreachable by incremental GC.
|
protected |
Enqueue the registration for this object.
Enqueue the registration for this object.
Force any base classes to be registered first
Reimplemented in UStruct.
| void UObjectBase::ReleaseRef | ( | ) | const |
Release ref-count on the object.
|
static |
Removes the class prefix from the given string
Removes prefix from the native class name
Associate an external package directly to this object.
|
inlineprotected |
Set the object flags directly
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Shared function called from the various InitializePrivateStaticClass functions generated my the IMPLEMENT_CLASS macro.
|
friend |
|
friend |
Create a new instance of an object or replace an existing object. If both an Outer and Name are specified, and there is an object already in memory with the same Class, Outer, and Name, the existing object will be destructed, and the new object will be created in its place.
| Class | the class of the object to create |
| InOuter | the object to create this object within (the Outer property for the new object will be set to the value specified here). |
| Name | the name to give the new object. If no value (NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. |
| SetFlags | the ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| InternalSetFlags | the InternalObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| bCanReuseSubobjects | if set to true, SAO will not attempt to destroy a subobject if it already exists in memory. |
| bOutReusedSubobject | flag indicating if the object is a subobject that has already been created (in which case further initialization is not necessary). |
| ExternalPackage | External Package assigned to the allocated object, if any |
| RemoteId | Globally unique id for this object |
| GCGuard | Special synchronization object that prevents GC from running when reconstructing an object on top of existing one |
|
friend |
|
friend |
Force a pending registrant to register now instead of in the natural order
| FNameAndObjectHashIndex UObjectBase::NamePrivate = {} |