FStructTracker

The [TScriptStructTypeBitSet](API\Plugins\StructUtils\TScriptStructTypeBitSet) holds information on "existence" of subtypes of a given [UStruct](API\Runtime\CoreUObject\UObject\UStruct).

Choose your operating system:

Windows

macOS

Linux

References

Module

StructUtils

Header

/Engine/Plugins/Experimental/StructUtils/Source/StructUtils/Public/ScriptStructTypeBitSet.h

Include

#include "ScriptStructTypeBitSet.h"

Syntax

struct FStructTracker

Remarks

The TScriptStructTypeBitSet holds information on "existence" of subtypes of a given UStruct. The information on available child-structs is gathered lazily - the internal FStructTracker is assigning a given type a new index the very first time the type is encountered. To create a specific instantiation of the type you need to declare the static StructTracker member variable. To do it for an arbitrary type FFooBar add the following in your header or cpp file:

DECLARE_STRUCTTYPEBITSET(FMyFooBarBitSet, FFooBar);

where FMyFooBarBitSet is the alias of the type you can use in your code. To have your type exposed to other modules use DECLARE_STRUCTTYPEBITSET_EXPORTED, like so:

DECLARE_STRUCTTYPEBITSET_EXPORTED(MYMODULE_API, FMyFooBarBitSet, FFooBar);

The type contains static members so you'll also need to define these. You can easily do it by placing the following in your cpp file (continuing the FFooBar example):

DEFINE_STRUCTTYPEBITSET(FMyFooBarBitSet);

Variables

Name Description

Public variable

TArray< FName, ...

 

DebugStructTypeNamesList

Public variable

TArray< TWeakOb...

 

StructTypesList

Public variable

TSet< uint32 >

 

StructTypeToIndexSet

Functions

Name Description

Public function Const

TConstArrayV...

 

DebugGetAllStructTypes()

Public function Const

FName

 

DebugGetStructTypeName

(
    const int32 StructTypeIndex
)

Public function

void

 

DebugResetStructTypeMappingInfo()

Public function

int32

 

FindOrAddStructTypeIndex

(
    const UScriptStruct& InStructType
)

Public function Const

const UScrip...

 

GetStructType

(
    const int32 StructTypeIndex
)