Navigation
API > API/Runtime > API/Runtime/CoreUObject
Base class for all UObject types that contain fields.
| Name | UStruct |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/Class.h |
| Include Path | #include "UObject/Class.h" |
Syntax
UCLASS (MinimalAPI, Config=Engine)
class UStruct :
public UField ,
private FStructBaseChain
Inheritance Hierarchy
- FStructBaseChain → UStruct
- UObjectBase → UObjectBaseUtility → UObject → UField → UStruct
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UStruct
(
const FObjectInitializer& ObjectInitializer |
Constructors. | UObject/Class.h | |
| UObject/Class.h | |||
UStruct
(
EStaticConstructor, |
UObject/Class.h | ||
UStruct
(
const FObjectInitializer& ObjectInitializer, |
UObject/Class.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UStruct() |
UObject/Class.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FConstSuperStructIterator | TObjectPtrLinkedListIteratorConst< UStruct, &UStruct::SuperStruct, true > | UObject/Class.h | |
| FSuperStructIterator | TObjectPtrLinkedListIterator< UStruct, &UStruct::SuperStruct, true > | UObject/Class.h | |
| FUnresolvedScriptPropertiesArray | TArray< TPair< TFieldPath< FField >, int32 > > | UObject/Class.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ChildProperties | FField * | Pointer to start of linked list of child fields | UObject/Class.h | |
| Children | TObjectPtr< UField > | Pointer to start of linked list of child fields | UObject/Class.h |
|
| DestructorLink | FProperty * | In memory only: Linked list of properties requiring destruction. | UObject/Class.h | |
| FieldPathSerialNumber | int32 | Unique id incremented each time this class properties get destroyed | UObject/Class.h | |
| MinAlignment | int16 | Alignment of structure in memory, structure will be at least this large | UObject/Class.h | |
| PostConstructLink | FProperty * | In memory only: Linked list of properties requiring post constructor initialization | UObject/Class.h | |
| PropertiesSize | int32 | Total size of all UProperties, the allocated structure may be larger due to alignment | UObject/Class.h | |
| PropertyLink | FProperty * | In memory only: Linked list of properties from most-derived to base | UObject/Class.h | |
| PropertyWrappers | TArray< TObjectPtr< UPropertyWrapper > > | List of wrapper UObjects for FProperties | UObject/Class.h |
|
| RefLink | FProperty * | In memory only: Linked list of object reference properties from most-derived to base | UObject/Class.h | |
| Script | TArray< uint8 > | Script bytecode associated with this object | UObject/Class.h | |
| ScriptAndPropertyObjectReferences | TArray< TObjectPtr< UObject > > | Array of object references embedded in script code and referenced by FProperties. | UObject/Class.h |
|
| TotalFieldCount | int32 | Number of fields, inclusive of base fields and fixed-size array elements. Generated during Link(). | UObject/Class.h | |
| UnresolvedScriptProperties | FUnresolvedScriptPropertiesArray * | Contains a list of script properties that couldn't be resolved at load time | UObject/Class.h | |
| UnversionedEditorSchema | std::atomic< const struct FUnversionedStructSchema * > | Cached schema for optimized unversioned property serialization, with editor data, owned by this. | UObject/Class.h | |
| UnversionedGameSchema | std::atomic< const struct FUnversionedStructSchema * > | Cached schema for optimized unversioned and filtereditoronly property serialization, owned by this. | UObject/Class.h | |
| UStruct | union UStruct | UObject/Class.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StructStateFlags | std::atomic< uint16 > | State flags Access via HasAllStructStateFlags() | UObject/Class.h | |
| SuperStruct | TObjectPtr< UStruct > | Struct this inherits from, may be null | UObject/Class.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ActivateTrackingPropertyValueFlag
(
EPropertyValueFlags Flags, |
Try to activate tracking of this type of flag for the instance. | UObject/Class.h | |
void CollectBytecodeAndPropertyReferencedObjects() |
Collects UObjects referenced by bytecode and properties for faster GC access | UObject/Class.h | |
void CollectBytecodeAndPropertyReferencedObjectsRecursively() |
Collects UObjects referenced by bytecode and properties for this class and its child fields and their children... | UObject/Class.h | |
| Collects UObjects referenced by bytecode | UObject/Class.h | ||
| Collects UObjects referenced by properties | UObject/Class.h | ||
| Look up a property by an alternate name if it was not found in the first search, this is overridden for user structs | UObject/Class.h | ||
bool DebugIsPropertyChainReady() |
Returns true if this object has been initialized to the point that its property chain data is available. | UObject/Class.h | |
void DeleteUnresolvedScriptProperties() |
Deletes the UnresolvedScriptProperties array | UObject/Class.h | |
void DestroyChildPropertiesAndResetPropertyLinks() |
Destroys all properties owned by this struct | UObject/Class.h | |
virtual void DestroyStruct
(
void* Dest, |
Destroy a struct in memory. | UObject/Class.h | |
| Searches property link chain for a property with the specified name | UObject/Class.h | ||
FProperty * FindPropertyByOffset
(
int32 Offset |
Internal API that searches the property link chain for a property with the specified offset | UObject/Class.h | |
virtual FString GetAuthoredNameForField
(
const FField* Field |
Returns a human readable string for a given field, overridden for user defined structs | UObject/Class.h | |
virtual FString GetAuthoredNameForField
(
const UField* Field |
Returns a human readable string for a given field, overridden for user defined structs | UObject/Class.h | |
bool GetBoolMetaDataHierarchical
(
const FName& Key |
Try and find boolean metadata with the given key. | UObject/Class.h | |
virtual UStruct * GetInheritanceSuper() |
Returns the structure used for inheritance, may be changed by child types | UObject/Class.h | |
int32 GetMinAlignment() |
Alignment of structure in memory, structure will be at least this large | UObject/Class.h | |
virtual const TCHAR * GetPrefixCPP() |
Returns the struct/ class prefix used for the C++ declaration of this struct/ class. | UObject/Class.h | |
int32 GetPropertiesSize() |
Total size of all UProperties, the allocated structure may be larger due to alignment | UObject/Class.h | |
const FBlake3Hash & GetSchemaHash
(
bool bSkipEditorOnly |
Get the Schema Hash for this struct - the hash of its property names and types. | UObject/Class.h | |
bool GetStringMetaDataHierarchical
(
const FName& Key, |
Try and find string metadata with the given key. | UObject/Class.h | |
FTopLevelAssetPath GetStructPathName() |
Returns struct path name as a package + struct FName pair | UObject/Class.h | |
int32 GetStructureSize() |
Returns actual allocated size of structure in memory | UObject/Class.h | |
UStruct * GetSuperStruct() |
Struct this inherits from, may be null | UObject/Class.h | |
FSuperStructIterator GetSuperStructIterator () |
Returns an iterate to traverse the super chain without doing TObjectPtr access tracking, starting with this struct | UObject/Class.h | |
FConstSuperStructIterator GetSuperStructIterator () |
Returns an iterate to traverse the super chain without doing TObjectPtr access tracking, starting with this struct | UObject/Class.h | |
bool HasAssetRegistrySearchableProperties() |
Returns true if this struct has Asset Registry searchable properties | UObject/Class.h | |
| Determines if the struct or any of its super structs has any metadata associated with the provided key | UObject/Class.h | ||
virtual bool HasPropertyValueFlag
(
EPropertyValueFlags Flags, |
Query whether the instance has the flag set for the property. True if tracking is inactive. | UObject/Class.h | |
virtual void InitializeStruct
(
void* Dest, |
Initialize a struct over uninitialized memory. | UObject/Class.h | |
void InstanceSubobjectTemplates
(
TNotNull< void* > Data, |
Creates new copies of components | UObject/Class.h | |
| Returns true if this struct either is SomeBase, or is a child of SomeBase. | UObject/Class.h | ||
bool IsChildOf () |
Returns true if this struct either is class T, or is a child of class T. | UObject/Class.h | |
virtual bool IsStructTrashed() |
If true, this class has been cleaned and sanitized (trashed) and should not be used | UObject/Class.h | |
virtual bool IsTrackingPropertyValueFlag
(
EPropertyValueFlags Flags, |
Query whether the instance is tracking this type of flag. | UObject/Class.h | |
virtual void Link
(
FArchive& Ar, |
Creates the field/property links and gets structure ready for use at runtime | UObject/Class.h | |
virtual void PreloadChildren
(
FArchive& Ar |
Preloads all fields that belong to this struct | UObject/Class.h | |
virtual void ResetPropertyValueFlags
(
EPropertyValueFlags Flags, |
Reset the flag to false for every property on the instance. | UObject/Class.h | |
virtual void * ResolveVisitedPathInfo
(
void* Data, |
Attempt to resolve the given inner path info against this outer struct to get the inner property value. | UObject/Class.h | |
virtual void SerializeBin
(
FStructuredArchive::FSlot Slot, |
Serializes struct properties, does not handle defaults. | UObject/Class.h | |
virtual void SerializeBin
(
FArchive& Ar, |
Serializes struct properties, does not handle defaults. | UObject/Class.h | |
void SerializeBinEx
(
FStructuredArchive::FSlot Slot, |
Serializes the class properties that reside in Data if they differ from the corresponding values in DefaultData | UObject/Class.h | |
virtual EExprToken SerializeExpr
(
int32& iCode, |
Serialize an expression to an archive. Returns expression token | UObject/Class.h | |
virtual void SerializePropertyValueFlags
(
EPropertyValueFlags Flags, |
Serialize the flag for every property on the instance. NOT FOR PERSISTENT SERIALIZATION! | UObject/Class.h | |
virtual void SerializeTaggedProperties
(
FStructuredArchive::FSlot Slot, |
Serializes list of properties, using property tags to handle mismatches | UObject/Class.h | |
virtual void SerializeTaggedProperties
(
FArchive& Ar, |
Serializes list of properties, using property tags to handle mismatches | UObject/Class.h | |
void SetPropertiesSize
(
int32 NewSize |
Modifies the property size after it's been recomputed | UObject/Class.h | |
virtual void SetPropertyValueFlag
(
EPropertyValueFlags Flags, |
Set the value of the flag for the property on the instance. Ignored if tracking is inactive. | UObject/Class.h | |
virtual void SetSuperStruct
(
UStruct* NewSuperStruct |
Sets the super struct pointer and updates hash information as necessary. | UObject/Class.h | |
void SetUnresolvedScriptProperties
(
FUnresolvedScriptPropertiesArray& InUnresolvedProperties |
Sets the UnresolvedScriptProperties array | UObject/Class.h | |
void StaticLink
(
bool bRelinkExistingProperties |
Static wrapper for Link, using a dummy archive | UObject/Class.h | |
virtual void TrackDefaultInitializedProperties
(
void* DefaultData |
Track the initialized properties of a default object. | UObject/Class.h | |
EPropertyVisitorControlFlow Visit
(
void* Data, |
UObject/Class.h | ||
virtual EPropertyVisitorControlFlow Visit
(
FPropertyVisitorContext& Context, |
Visits this property and allows recursion into the inner properties This method allows callers to visit inner properties without knowing about its container type as opposed to TPropertyIterator. | UObject/Class.h | |
EPropertyVisitorControlFlow Visit
(
void* Data, |
Visits this property and allows recursion into the inner properties This method allows callers to visit inner properties without knowing about its container type as opposed to TPropertyIterator. | UObject/Class.h |
Overridden from UField
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddCppProperty
(
FProperty* Property |
UObject/Class.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinishDestroy () |
Called to finish destroying the object. | UObject/Class.h | |
virtual void GetPreloadDependencies
(
TArray< UObject* >& OutDeps |
Called during cooking. | UObject/Class.h | |
virtual void PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | UObject/Class.h | |
| Handles reading, writing, and reference collecting using FArchive. | UObject/Class.h | ||
virtual void Serialize
(
FStructuredArchive::FRecord Record |
UObject/Class.h | ||
virtual void TagSubobjects
(
EObjectFlags NewFlags |
Tags objects that are part of the same asset with the specified object flag, used for GC checking | UObject/Class.h |
Overridden from UObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void RegisterDependencies() |
Force any base classes to be registered first, then call BaseRegister | UObject/Class.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ArePropertyGuidsAvailable() |
Returns if we have access to property guids | UObject/Class.h | |
void ConvertUFieldsToFFields() |
UObject/Class.h | ||
| Find property guid | UObject/Class.h | ||
| Returns the property name from the guid | UObject/Class.h | ||
| Serializes list of properties to a te, using property tags to handle mismatches | UObject/Class.h | ||
void SerializeProperties
(
FArchive& Ar |
Serializes properties of this struct | UObject/Class.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
UObject/Class.h |