Language:
Discover
By Skill Level
By Category

UClass

Choose your OS:

Inheritance Hierarchy

Syntax

class UClass :
    public UStruct ,
    private FClassBaseChain

Remarks

An object class.

Variables

Name Description

Public variable

uint32 : 1

 

bCooked

Used to check if the class was cooked or not

Public variable

ClassAddReferen ...

 

ClassAddReferencedObjects

Pointer to a static AddReferencedObjects method.

Public variable

EClassCastFlags

 

ClassCastFlags

Cast flags used to accelerate dynamic_cast on objects of this type for common T

Public variable

FName

 

ClassConfigName

WITH_EDITOR.

Public variable

ClassConstructo ...

 

ClassConstructor

Public variable

UObject *

 

ClassDefaultObject

The class default object; used for delta serialization and object initialization

Public variable

EClassFlags

 

ClassFlags

Class flags; See EClassFlags for more information

Public variable

UObject *

 

ClassGeneratedBy

This is the blueprint that caused the generation of this class, or null if it is a native compiled-in class

Public variable

TArray < FRepRec ...

 

ClassReps

List of replication records

Public variable

uint32 : 31

 

ClassUnique

Class pseudo-unique counter; used to accelerate unique instance name generation

Public variable

ClassVTableHelp ...

 

ClassVTableHelperCtorCaller

Public variable

UClass *

 

ClassWithin

The required type for the outer of instances of this class

Public variable

FGCDebugReferen ...

 

DebugTokenMap

TokenIndex map to look-up token stream index origin.

Public variable

TArray < FImplem ...

 

Interfaces

The list of interfaces which this class implements, along with the pointer property that is located at the offset of the interface's vtable.

Public variable

TArray < FNative ...

 

NativeFunctionLookupTable

This class's native functions.

Public variable

TArray < UField ...

 

NetFields

List of network relevant fields (properties and functions)

Public variable

FGCReferenceTok ...

 

ReferenceTokenStream

Reference token stream used by realtime garbage collector, finalized in AssembleReferenceTokenStream

Public variable

FCriticalSectio ...

 

ReferenceTokenStreamCritical

CS for the token stream.

Public variable

UStructProperty ...

 

UberGraphFramePointerProperty

Property that points to the ubergraph frame, this is a blueprint specific structure that has been hoisted to UClass so that the interpreter (ScriptCore.cpp) can access it efficiently.

Constructors

Name Description

Public function

UClass

(
    FVTableHelper & Helper
)

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Public function

UClass

(
    const FObjectInitializer & ObjectIn...
)

Constructors.

Public function

UClass

(
    const FObjectInitializer & ObjectIn...,
    UClass * InSuperClass
)

Create a new UClass given its superclass.

Public function

UClass

(
    EStaticConstructor ,
    FName InName,
    uint32 InSize,
    EClassFlags InClassFlags,
    EClassCastFlags InClassCastFlags,
    const TCHAR * InClassConfigName,
    EObjectFlags InFlags,
    ClassConstructorType InClassConstru...,
    ClassVTableHelperCtorCallerType InC...,
    ClassAddReferencedObjectsType InCla...
)

Called when statically linked.

Functions

Name Description

Public function Static

void

 

__DefaultConstructor

(
    const FObjectInitializer & X
)

Public function Static

UObject *...

 

__VTableCtorCaller

(
    FVTableHelper & Helper
)

Public function

void

 

AddDefaultSubobject

(
    UObject * NewSubobject,
    UClass * BaseClass
)

Adds a new default instance map item

Public function

void

 

AddFunctionToFunctionMap

(
    UFunction * Function,
    FName FuncName
)

Add a function to the function map

Public function

void

 

AddNativeFunction

(
    const WIDECHAR * InName,
    FNativeFuncPtr InPointer
)

Add a native function to the internal native function table, but with a unicode name.

Public function

void

 

AddNativeFunction

(
    const ANSICHAR * InName,
    FNativeFuncPtr InPointer
)

Add a native function to the internal native function table

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

Callback used to allow an object to register its direct object references that are not already covered by the token stream.

Public function

void

 

AssembleReferenceTokenStream

(
    bool bForce
)

Assembles the token stream for realtime garbage collection by combining the per class only token stream for each class in the class hierarchy.

Public function Static

void

 

AssembleReferenceTokenStreams()

Assemble reference token streams for all classes if they haven't had it assembled already

Public function

void

 

CallAddReferencedObjects

(
    UObject * This,
    FReferenceCollector & Collector
)

Calls AddReferencedObjects static method on the specified object.

Public function

void

 

ClearFunctionMapsCaches()

Clears the function name caches, in case things have changed

Public function Virtual

void

 

ConditionalRecompileClass

(
    TArray < UObject * >* ObjLo...
)

USE_UBER_GRAPH_PERSISTENT_FRAME.

Protected function Virtual

UObject *...

 

CreateDefaultObject()

Get the default object from the class, creating it if missing, if requested or under a few other circumstances

Public function

void

 

CreateLinkAndAddChildFunctionsToMap

(
    const FClassFunctionLinkInfo * ...,
    uint32 NumFunctions
)

Public function Virtual

void

 

CreatePersistentUberGraphFrame

(
    UObject * Obj,
    bool bCreateOnlyIfEmpty,
    bool bSkipSuperClass,
    UClass * OldClass
)

Creates memory to store temporary data

Public function Virtual

void

 

DestroyPersistentUberGraphFrame

(
    UObject * Obj,
    bool bSkipSuperClass
)

Clears memory to store temporary data

Public function

void

 

EmitFixedArrayBegin

(
    int32 Offset,
    const FName & DebugName,
    int32 Stride,
    int32 Count
)

Realtime garbage collection helper function used to indicate the beginning of a fixed array.

Public function

void

 

EmitFixedArrayEnd()

Realtime garbage collection helper function used to indicated the end of a fixed array.

Public function

void

 

EmitObjectArrayReference

(
    int32 Offset,
    const FName & DebugName
)

Realtime garbage collection helper function used to emit token containing information about a an array of UObject references at the passed in offset.

Public function

void

 

EmitObjectReference

(
    int32 Offset,
    const FName & DebugName,
    EGCReferenceType Kind
)

Realtime garbage collection helper function used to emit token containing information about a direct UObject reference at the passed in offset.

Public function

uint32

 

EmitStructArrayBegin

(
    int32 Offset,
    const FName & DebugName,
    int32 Stride
)

Realtime garbage collection helper function used to indicate an array of structs at the passed in offset.

Public function

void

 

EmitStructArrayEnd

(
    uint32 SkipIndexIndex
)

Realtime garbage collection helper function used to indicate the end of an array of structs.

Public function Virtual

UObject *...

 

FindArchetype

(
    UClass * ArchetypeClass,
    const FName ArchetypeName
)

Finds the object that is used as the parent object when serializing properties, overridden for blueprints

Public function Static

UClass *

 

FindCommonBase

(
    UClass * InClassA,
    UClass * InClassB
)

Finds the common base class that parents the two classes passed in.

Public function Static

UClass *

 

FindCommonBase

(
    const TArray < UClass * >& InCl...
)

Finds the common base class that parents the array of classes passed in.

Public function

UFunction &#...

 

FindFunctionByName

(
    FName InName,
    EIncludeSuperFlag::Type IncludeSupe...
)

Looks for a given function name

Public function Virtual

void

 

FlushCompilationQueueForLevel()

Public function

void

 

GenerateFunctionList

(
    TArray < FName >& OutArray
)

Public function Virtual

UObject *...

 

GetArchetypeForCDO()

Returns archetype object for CDO

Public function Virtual

UClass *

 

GetAuthoritativeClass()

If there are potentially multiple versions of this class (e.g. blueprint generated classes), this function will return the authoritative version, which should be used for references

Public function

const UClass ...

 

GetAuthoritativeClass()

Public function

void

 

GetAutoCollapseCategories

(
    TArray < FString >& OutAutoCollapse...
)

Public function

void

 

GetAutoExpandCategories

(
    TArray < FString >& OutAutoExpandCa...
)

Public function

EClassFlags

 

GetClassFlags()

Gets the class flags.

The class flags.

Public function

void

 

GetClassGroupNames

(
    TArray < FString >& OutClassGroupNa...
)

Public function

const FStrin ...

 

GetConfigName()

Translates the hardcoded script config names (engine, editor, input and game) to their global pendants and otherwise uses config(myini) name to look for a game specific implementation and creates one based on the default if it doesn't exist yet.

Public function

const ICppCl ...

 

GetCppTypeInfo()

End of UStruct interface.

Public function

UObject *...

 

GetDefaultObject

(
    bool bCreateIfNeeded
)

Get the default object from the class

the CDO for this class

Public function

T *

 

GetDefaultObject()

Get the default object from the class and cast to a particular type

the CDO for this class

Public function

FName

 

GetDefaultObjectName()

Get the name of the CDO for the this class

The name of the CDO

Public function Virtual

void

 

GetDefaultObjectPreloadDependencies

(
    TArray < UObject * >& OutDeps
)

Returns all objects that should be preloaded before the class default object is serialized at load time.

Public function

void

 

GetDefaultObjectSubobjects

(
    TArray < UObject * >& OutDefaul...
)

Gets all default instanced objects (often components).

Public function Static

FFeedbackCon ...

 

GetDefaultPropertiesFeedbackContext()

Feedback context for default property import

Public function

int32

 

GetDefaultsCount()

Returns amount of memory used by default object

Public function

UObject *...

 

GetDefaultSubobjectByName

(
    FName ToFind
)

Searches for the default instanced object (often a component) by name

Public function

FString

 

GetDescription()

Public function

void

 

GetHideFunctions

(
    TArray < FString >& OutHideFunction...
)

Editor only properties.

Public function

UPackage ...

 

GetOuterUPackage()

Public function

UClass *

 

GetSuperClass()

Returns parent class, the parent of a Class is always another class

Public function

bool

 

HasAllCastFlags

(
    EClassCastFlags FlagsToCheck
)

Public function

bool

 

HasAllClassFlags

(
    EClassFlags FlagsToCheck
)

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

Public function

bool

 

HasAnyCastFlag

(
    EClassCastFlags FlagToCheck
)

Used to safely check whether the passed in flag is set.

Public function

bool

 

HasAnyClassFlags

(
    EClassFlags FlagsToCheck
)

Used to safely check whether the passed in flag is set.

Public function Virtual

bool

 

HasProperty

(
    UProperty * InProperty
)

Checks if the property exists on this class or a parent class.

Public function

bool

 

HotReloadPrivateStaticClass

(
    uint32 InSize,
    EClassFlags InClassFlags,
    EClassCastFlags InClassCastFlags,
    const TCHAR * InConfigName,
    ClassConstructorType InClassConstru...,
    ClassVTableHelperCtorCallerType InC...,
    ClassAddReferencedObjectsType InCla...,
    UClass * TClass_Super_StaticCla...,
    UClass * TClass_WithinClass_Sta...
)

Called when a class is reloading from a DLL...updates various information in-place.

Public function

bool

 

ImplementsInterface

(
    const UClass * SomeInterface
)

This will return whether or not this class implements the passed in class / interface

Public function Virtual

void

 

InitPropertiesFromCustomList

(
    uint8 * DataPtr,
    const uint8 * DefaultDataPtr
)

Helper method to assist with initializing object properties from an explicit list.

Public function

bool

 

IsAutoCollapseCategory

(
    const TCHAR * InCategory
)

Public function

bool

 

IsAutoExpandCategory

(
    const TCHAR * InCategory
)

Public function

bool

 

IsClassGroupName

(
    const TCHAR * InGroupName
)

Public function

bool

 

IsFunctionHidden

(
    const TCHAR * InFunction
)

Public function Virtual

bool

 

IsFunctionImplementedInBlueprint

(
    FName InFunctionName
)

Determines if the specified function has been implemented in a Blueprint

Public function Static

bool

 

IsSafeToSerializeToStructuredArchives

(
    UClass * InClass
)

Helper function for determining if the given class is compatible with structured archive serialization

Public function Virtual

void

 

PostInitInstance

(
    UObject * InObj
)

Called after PostInitProperties during object construction to allow class specific initialization of an object instance.

Public function Virtual

void

 

PostLoadDefaultObject

(
    UObject * Object
)

Wraps the PostLoad() call for the class default object.

Public function

void

 

PrependStreamWithSuperClass

(
    UClass & SuperClass
)

WITH_EDITOR || HACK_HEADER_GENERATOR.

Public function Virtual

void

 

PurgeClass

(
    bool bRecompilingOnLoad
)

Purges out the properties of this class in preparation for it to be regenerated

Public function

void

 

RemoveFunctionFromFunctionMap

(
    UFunction * Function
)

Remove a function from the function map

Public function

bool

 

ReplaceNativeFunction

(
    FName InName,
    FNativeFuncPtr InPointer,
    bool bAddToFunctionRemapTable
)

Replace a native function in the internal native function table

Public function Virtual

void

 

SerializeDefaultObject

(
    UObject * Object,
    FArchive & Ar
)

Public function Virtual

void

 

SerializeDefaultObject

(
    UObject * Object,
    FStructuredArchive::FSlot Slot
)

Serializes the passed in object as this class's default object using the given archive

Public function

void

 

SetCppTypeInfoStatic

(
    const FCppClassTypeInfoStatic *...
)

Sets C++ type information. Should not be NULL.

Public function

void

 

SetUpRuntimeReplicationData()

Initializes the ClassReps and NetFields arrays used by replication.

Public function Static

UClass *

 

StaticClass()

Returns a UClass object representing this class at runtime

Public function Static

EClassCastFl ...

 

StaticClassCastFlags()

Returns the static cast flags for this class

Public function Static

const TCHAR ...

 

StaticPackage()

Returns the package this class belongs in

Public function Static

void

 

StaticRegisterNativesUClass()

Overridden from UStruct

Name Description

Public function Virtual

const TCHAR ...

 

GetPrefixCPP()

Returns the struct/ class prefix used for the C++ declaration of this struct/ class.

Public function Virtual

void

 

Link

(
    FArchive & Ar,
    bool bRelinkExistingProperties
)

End of UField interface.

Public function Virtual

void

 

SerializeSuperStruct

(
    FArchive & Ar
)

Serializes the SuperStruct pointer

Public function Virtual

void

 

SetSuperStruct

(
    UStruct * NewSuperStruct
)

Sets the super struct pointer and updates hash information as necessary.

Overridden from UField

Name Description

Public function Virtual

void

 

Bind()

End of UObject interface.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

UClass UObject implementation.

Public function Virtual

void

 

GetAssetRegistryTags

(
    TArray < FAssetRegistryTag >& OutTa...
)

Public function Virtual

FString

 

GetDesc()

A one line description of an object for viewing in the thumbnail view of the generic browser

Public function Virtual

FRestoreForU ...

 

GetRestoreForUObjectOverwrite()

Save information for StaticAllocateObject in the case of overwriting an existing object.

Public function Virtual

bool

 

IsAsset()

Returns true if this object is considered an asset.

Public function Virtual

bool

 

IsNameStableForNetworking()

WITH_EDITOR.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object, and immediately after any undo/redo.

Public function Virtual

bool

 

Rename

(
    const TCHAR * NewName,
    UObject * NewOuter,
    ERenameFlags Flags
)

Rename this object to a unique name.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject interface.

Public function Virtual

void

 

TagSubobjects

(
    EObjectFlags NewFlags
)

Tags objects that are part of the same asset with the specified object flag, used for GC checking

Overridden from UObjectBase

Name Description

Public function Virtual

void

 

DeferredRegister

(
    UClass * UClassStaticClass,
    const TCHAR * PackageName,
    const TCHAR * InName
)

Register the native class.

Operators

Name Description

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal * InMem
)

For internal use only; use StaticConstructObject() to create new objects.

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal InInternalOnly,
    UObject * InOuter,
    FName InName,
    EObjectFlags InSetFlags
)

For internal use only; use StaticConstructObject() to create new objects.

Typedefs

Name

Description

ClassAddReferencedObjectsType

ClassConstructorType

ClassVTableHelperCtorCallerType

StaticClassFunctionType

Super

Typedef for the base class (UStruct )

ThisClass

Typedef for UClass .

WithinClass

The required type of this object's outer (class UPackage )

Constants

Name

Description

StaticClassFlags

Bitwise union of EClassFlags pertaining to this class.

References

Module

CoreUObject

Header

Runtime/CoreUObject/Public/UObject/Class.h