Navigation
API > API/Runtime > API/Runtime/CoreUObject
Reflection data for a standalone structure declared in a header or as a user defined struct
| Name | UScriptStruct |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/Class.h |
| Include Path | #include "UObject/Class.h" |
Syntax
UCLASS (MinimalAPI, Config=Engine)
class UScriptStruct : public UStruct
Inheritance Hierarchy
- FStructBaseChain → UStruct → UScriptStruct
- UObjectBase → UObjectBaseUtility → UObject → UField → UStruct → UScriptStruct
Derived Classes
UScriptStruct derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UScriptStruct
(
EStaticConstructor, |
UObject/Class.h | ||
UScriptStruct
(
const FObjectInitializer& ObjectInitializer |
UObject/Class.h | ||
UScriptStruct
(
const FObjectInitializer& ObjectInitializer, |
UObject/Class.h |
Structs
| Name | Remarks |
|---|---|
| ICppStructOps | Interface to template to manage dynamic access to C++ struct construction and destruction |
| TAutoCppStructOps | Template for noexport classes to autoregister before main starts |
| TCppStructOps | Template to manage dynamic access to C++ struct construction and destruction |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StructFlags | EStructFlags | UObject/Class.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearCppStructOps() |
Resets currently assigned CppStructOps, called when loading a struct | UObject/Class.h | |
void ClearScriptStruct
(
void* Dest, |
Reinitialize a struct in memory. | UObject/Class.h | |
bool CompareScriptStruct
(
const void* A, |
Compare two script structs | UObject/Class.h | |
void CopyScriptStruct
(
void* Dest, |
Copy a struct over an existing struct | UObject/Class.h | |
| Export script struct to a string that can later be imported | UObject/Class.h | ||
| Provide an FProperty and data pointer when given an FName of a property that this object owns indirectly (ie FInstancedStruct) | UObject/Class.h | ||
ICppStructOps * GetCppStructOps() |
Returns the CppStructOps that can be used to do custom operations | UObject/Class.h | |
virtual FGuid GetCustomGuid() |
Returns the custom Guid assigned to this struct for User Defined Structs, or an invalid Guid | UObject/Class.h | |
virtual FString GetStructCPPName
(
uint32 CPPExportFlags |
Returns the (native, c++) name of the struct | UObject/Class.h | |
virtual uint32 GetStructTypeHash
(
const void* Src |
Calls GetTypeHash for native structs, otherwise computes a hash of all struct members | UObject/Class.h | |
bool HasDefaults() |
If it is native, it is assumed to have defaults because it has a constructor | UObject/Class.h | |
const TCHAR * ImportText
(
const TCHAR* Buffer, |
Sets value of script struct based on imported string | UObject/Class.h | |
const TCHAR * ImportText
(
const TCHAR* Buffer, |
Sets value of script struct based on imported string | UObject/Class.h | |
virtual void InitializeDefaultValue
(
uint8* InStructData |
Initializes this structure to its default values | UObject/Class.h | |
virtual void PrepareCppStructOps () |
Look for the CppStructOps and hook it up | UObject/Class.h | |
virtual void RecursivelyPreload() |
Used by User Defined Structs to preload this struct and any child objects | UObject/Class.h | |
void SerializeItem
(
FArchive& Ar, |
Serializes a specific instance of a struct | UObject/Class.h | |
void SerializeItem
(
FStructuredArchive::FSlot Slot, |
UObject/Class.h | ||
void SetStructTrashed
(
bool bIsTrash |
Sets or unsets the trashed flag on this struct | UObject/Class.h | |
bool ShouldSerializeAtomically
(
FArchive& Ar |
Returns whether this struct should be serialized atomically. | UObject/Class.h | |
bool UseBinarySerialization
(
const FArchive& Ar |
Returns true if this struct should be binary serialized for the given archive | UObject/Class.h | |
bool UseNativeSerialization() |
Returns true if this struct has a native serialize function | UObject/Class.h |
Overridden from UStruct
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DestroyStruct
(
void* Dest, |
Destroy a struct in memory. | UObject/Class.h | |
virtual void InitializeStruct
(
void* Dest, |
Initialize a struct over uninitialized memory. | 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 void Link
(
FArchive& Ar, |
Creates the field/property links and gets structure ready for use at runtime | 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 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 |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Handles reading, writing, and reference collecting using FArchive. | UObject/Class.h | ||
virtual void Serialize
(
FStructuredArchive::FRecord Record |
UObject/Class.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Similar to GetStructPathName() but works with nested structs by using just the package name and struct name so a struct path name /Package/Name.Object:Struct will be flattened to /Package/Name.Struct. | UObject/Class.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DeferCppStructOps
(
FTopLevelAssetPath Target, |
Stash a CppStructOps for future use | UObject/Class.h | |
static void DeferCppStructOps
(
FTopLevelAssetPath Target |
UObject/Class.h | ||
static void RemoveAllDeferredCppStructOps
(
FName PackageName |
On module unload, remove all entries in a package from the stash The package name should be the full package name, such as "/Script/Engine" | UObject/Class.h | |
static void RemoveDeferredCppStructOps
(
FTopLevelAssetPath Target |
On module unload, remove the entry from the stash | UObject/Class.h |