Navigation
API > API/Runtime > API/Runtime/CoreUObject
Low level implementation of UObject, should not be used directly in game code
| Name | UObjectBase |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectBase.h |
| Include Path | #include "UObject/UObjectBase.h" |
Syntax
class UObjectBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UObjectBase () |
UObject/UObjectBase.h | ||
UObjectBase
(
EObjectFlags InFlags |
Constructor used for bootstrapping Constructor used for bootstrapping | UObject/UObjectBase.h | |
UObjectBase
(
UClass* InClass, |
Constructor used by StaticAllocateObject Constructor used by StaticAllocateObject | UObject/UObjectBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UObjectBase() |
Final destructor, removes the object from the object array, and indirectly, from any annotations | UObject/UObjectBase.h |
Structs
| Name | Remarks |
|---|---|
| FNameAndObjectHashIndex | Merged data for constinit UObjects to hold their name before the FName system is initialized The object flags RF_MarkAsNative | RF_NeedInitialization are used to assert correct use of this union. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NamePrivate | FNameAndObjectHashIndex | UObject/UObjectBase.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ClassPrivate | ObjectPtr_Private::TNonAccessTrackedObjectPtr< UClass > | Class the object belongs to. | UObject/UObjectBase.h | |
| InternalIndex | int32 | Index into GObjectArray...very private. | UObject/UObjectBase.h | |
| ObjectFlags | EObjectFlags | Flags used to track and report various object states. | UObject/UObjectBase.h | |
| OuterPrivate | ObjectPtr_Private::TNonAccessTrackedObjectPtr< UObject > | Object this object resides in. | UObject/UObjectBase.h | |
| UObjectBase | union UObjectBase | UObject/UObjectBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddRef () |
Increments ref-count on the object. | UObject/UObjectBase.h | |
void AtomicallyClearFlags
(
EObjectFlags FlagsToClear |
Atomically clears the specified flags. | UObject/UObjectBase.h | |
void AtomicallySetFlags
(
EObjectFlags FlagsToAdd |
Atomically adds the specified flags. | UObject/UObjectBase.h | |
UClass * GetClass() |
Returns the UClass that defines the fields of this object | UObject/UObjectBase.h | |
UPackage * GetExternalPackage() |
Returns the external UPackage associated with this object, if any | UObject/UObjectBase.h | |
UPackage * GetExternalPackageInternal() |
Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting. | UObject/UObjectBase.h | |
EObjectFlags GetFlags() |
Retrieve the object flags directly | UObject/UObjectBase.h | |
FName GetFName() |
Returns the logical name of this object | UObject/UObjectBase.h | |
virtual FName GetFNameForStatID() |
Overridable method to return a logical name for identification in stats. | UObject/UObjectBase.h | |
UObject * GetOuter() |
Returns the UObject this object resides in | UObject/UObjectBase.h | |
uint32 GetUniqueID () |
Returns the unique ID of the object...these are reused so it is only unique while the object is alive. | UObject/UObjectBase.h | |
bool IsValidLowLevel() |
Checks to see if the object appears to be valid | UObject/UObjectBase.h | |
bool IsValidLowLevelFast
(
bool bRecursive |
Faster version of IsValidLowLevel. | UObject/UObjectBase.h | |
void MarkAsReachable() |
Marks the object as Reachable if it's currently marked as MaybeUnreachable by incremental GC. | UObject/UObjectBase.h | |
void ReleaseRef() |
Release ref-count on the object. | UObject/UObjectBase.h | |
void SetExternalPackage
(
UPackage* InPackage |
Associate an external package directly to this object. | UObject/UObjectBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DeferredRegister
(
UClass* UClassStaticClass, |
Convert a boot-strap registered class into a real one, add to uobject array, etc | UObject/UObjectBase.h | |
void LowLevelRename
(
FName NewName, |
Just change the FName and Outer and rehash into name hash tables. | UObject/UObjectBase.h | |
void Register
(
const TCHAR* PackageName, |
Enqueue the registration for this object. | UObject/UObjectBase.h | |
| Enqueue the registration for this object. | UObject/UObjectBase.h | ||
virtual void RegisterDependencies() |
Force any base classes to be registered first | UObject/UObjectBase.h | |
void SetFlagsTo
(
EObjectFlags NewFlags |
Set the object flags directly | UObject/UObjectBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void PrefetchClass
(
UObject* Object |
UObject/UObjectBase.h | ||
static void PrefetchOuter
(
UObject* Object |
UObject/UObjectBase.h | ||
static FString RemoveClassPrefix
(
const TCHAR* ClassName |
Removes the class prefix from the given stringRemoves prefix from the native class name | UObject/UObjectBase.h |