UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPropertyBagArrayRef Class Reference

#include <PropertyBag.h>

+ Inheritance diagram for FPropertyBagArrayRef:

Public Member Functions

 FPropertyBagArrayRef (const FPropertyBagPropertyDesc &InDesc, const void *InArray)
 
UE_API TValueOrError< bool, EPropertyBagResultGetValueBool (const int32 Index) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueByte (const int32 Index) const
 
UE_API TValueOrError< int32, EPropertyBagResultGetValueInt32 (const int32 Index) const
 
UE_API TValueOrError< uint32, EPropertyBagResultGetValueUInt32 (const int32 Index) const
 
UE_API TValueOrError< int64, EPropertyBagResultGetValueInt64 (const int32 Index) const
 
UE_API TValueOrError< uint64, EPropertyBagResultGetValueUInt64 (const int32 Index) const
 
UE_API TValueOrError< float, EPropertyBagResultGetValueFloat (const int32 Index) const
 
UE_API TValueOrError< double, EPropertyBagResultGetValueDouble (const int32 Index) const
 
UE_API TValueOrError< FName, EPropertyBagResultGetValueName (const int32 Index) const
 
UE_API TValueOrError< FString, EPropertyBagResultGetValueString (const int32 Index) const
 
UE_API TValueOrError< FText, EPropertyBagResultGetValueText (const int32 Index) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueEnum (const int32 Index, const UEnum *RequestedEnum) const
 
UE_API TValueOrError< FStructView, EPropertyBagResultGetValueStruct (const int32 Index, const UScriptStruct *RequestedStruct=nullptr) const
 
UE_API TValueOrError< UObject *, EPropertyBagResultGetValueObject (const int32 Index, const UClass *RequestedClass=nullptr) const
 
UE_API TValueOrError< UClass *, EPropertyBagResultGetValueClass (const int32 Index) const
 
UE_API TValueOrError< FSoftObjectPath, EPropertyBagResultGetValueSoftPath (const int32 Index) const
 
template<typename T >
TValueOrError< T, EPropertyBagResultGetValueEnum (const int32 Index) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueStruct (const int32 Index) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueObject (const int32 Index) const
 
UE_API TValueOrError< FPropertyBagArrayRef, EPropertyBagResultGetMutableNestedArrayRef (const int32 Index=0) const
 
UE_API TValueOrError< const FPropertyBagArrayRef, EPropertyBagResultGetNestedArrayRef (const int32 Index=0) const
 
UE_API EPropertyBagResult SetValueBool (const int32 Index, const bool bInValue)
 
UE_API EPropertyBagResult SetValueByte (const int32 Index, const uint8 InValue)
 
UE_API EPropertyBagResult SetValueInt32 (const int32 Index, const int32 InValue)
 
UE_API EPropertyBagResult SetValueUInt32 (const int32 Index, const uint32 InValue)
 
UE_API EPropertyBagResult SetValueInt64 (const int32 Index, const int64 InValue)
 
UE_API EPropertyBagResult SetValueUInt64 (const int32 Index, const uint64 InValue)
 
UE_API EPropertyBagResult SetValueFloat (const int32 Index, const float InValue)
 
UE_API EPropertyBagResult SetValueDouble (const int32 Index, const double InValue)
 
UE_API EPropertyBagResult SetValueName (const int32 Index, const FName InValue)
 
UE_API EPropertyBagResult SetValueString (const int32 Index, const FString &InValue)
 
UE_API EPropertyBagResult SetValueText (const int32 Index, const FText &InValue)
 
UE_API EPropertyBagResult SetValueEnum (const int32 Index, const uint8 InValue, const UEnum *Enum)
 
UE_API EPropertyBagResult SetValueStruct (const int32 Index, FConstStructView InValue)
 
UE_API EPropertyBagResult SetValueObject (const int32 Index, UObject *InValue)
 
UE_API EPropertyBagResult SetValueClass (const int32 Index, UClass *InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const int32 Index, const FSoftObjectPath &InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const int32 Index, const UObject *InValue)
 
template<typename T >
EPropertyBagResult SetValueEnum (const int32 Index, const T InValue)
 
template<typename T >
EPropertyBagResult SetValueStruct (const int32 Index, const T &InValue)
 
template<typename T >
EPropertyBagResult SetValueObject (const int32 Index, T *InValue)
 
- Public Member Functions inherited from FScriptArrayHelper
UE_FORCEINLINE_HINT FScriptArrayHelper (const FArrayProperty *InProperty, const void *InArray)
 
UE_FORCEINLINE_HINT bool IsValidIndex (int32 Index) const
 
int32 Num () const
 
int32 NumUnchecked () const
 
uint8GetRawPtr (int32 Index=0)
 
UE_FORCEINLINE_HINT uint8GetElementPtr (int32 Index=0)
 
void EmptyAndAddValues (int32 Count)
 
void EmptyAndAddUninitializedValues (int32 Count)
 
bool ExpandForIndex (int32 Index)
 
void Resize (int32 Count)
 
int32 AddValues (int32 Count)
 
UE_FORCEINLINE_HINT int32 AddValue ()
 
int32 AddUninitializedValues (int32 Count)
 
UE_FORCEINLINE_HINT int32 AddUninitializedValue ()
 
void InsertValues (int32 Index, int32 Count=1)
 
void EmptyValues (int32 Slack=0)
 
void RemoveValues (int32 Index, int32 Count=1)
 
void ClearValues (int32 Index, int32 Count=1)
 
void SwapValues (int32 A, int32 B)
 
void MoveAssign (void *InOtherArray)
 
void CountBytes (FArchive &Ar) const
 
void DestroyContainer_Unsafe ()
 

Additional Inherited Members

- Static Public Member Functions inherited from FScriptArrayHelper
static FScriptArrayHelper CreateHelperFormInnerProperty (const FProperty *InInnerProperty, const void *InArray, EArrayPropertyFlags InArrayFlags=EArrayPropertyFlags::None)
 

Detailed Description

A reference to an array in FInstancedPropertyBag Allows to modify the array via the FScriptArrayHelper API, and contains helper methods to get and set properties.

FInstancedPropertyBag Bag;
Bag.AddProperties({
    { ArrayName, EPropertyBagContainerType::Array, EPropertyBagPropertyType::Float }
});

if (auto FloatArrayRes = Bag.GetArrayRef(ArrayName); FloatArrayRes.IsValid())
{
    FPropertyBagArrayRef& FloatArray = FloatArrayRes.GetValue();
    const int32 NewIndex = FloatArray.AddValue();
    FloatArray.SetValueFloat(NewIndex, 123.0f);
}

Note: The array reference is not valid after the layout of the referenced property bag has changed!

Constructor & Destructor Documentation

◆ FPropertyBagArrayRef()

FPropertyBagArrayRef::FPropertyBagArrayRef ( const FPropertyBagPropertyDesc InDesc,
const void InArray 
)
inline

Member Function Documentation

◆ GetMutableNestedArrayRef()

TValueOrError< FPropertyBagArrayRef, EPropertyBagResult > FPropertyBagArrayRef::GetMutableNestedArrayRef ( const int32  Index = 0) const

Returns helper class to modify and access a nested array (mutable version). Note: Note: The array reference is not valid after the layout of the referenced property bag has changed!

Returns
helper class to modify and access arrays

◆ GetNestedArrayRef()

TValueOrError< const FPropertyBagArrayRef, EPropertyBagResult > FPropertyBagArrayRef::GetNestedArrayRef ( const int32  Index = 0) const

Returns helper class to access a nested array (const version). Note: Note: The array reference is not valid after the layout of the referenced property bag has changed!

Returns
helper class to access arrays

◆ GetValueBool()

TValueOrError< bool, EPropertyBagResult > FPropertyBagArrayRef::GetValueBool ( const int32  Index) const

Getters Numeric types (bool, (u)int32, (u)int64, float, double) support type conversion.

◆ GetValueByte()

TValueOrError< uint8, EPropertyBagResult > FPropertyBagArrayRef::GetValueByte ( const int32  Index) const

◆ GetValueClass()

TValueOrError< UClass *, EPropertyBagResult > FPropertyBagArrayRef::GetValueClass ( const int32  Index) const

◆ GetValueDouble()

TValueOrError< double, EPropertyBagResult > FPropertyBagArrayRef::GetValueDouble ( const int32  Index) const

◆ GetValueEnum() [1/2]

template<typename T >
TValueOrError< T, EPropertyBagResult > FPropertyBagArrayRef::GetValueEnum ( const int32  Index) const
inline
Returns
enum value of specified type.

◆ GetValueEnum() [2/2]

TValueOrError< uint8, EPropertyBagResult > FPropertyBagArrayRef::GetValueEnum ( const int32  Index,
const UEnum RequestedEnum 
) const

◆ GetValueFloat()

TValueOrError< float, EPropertyBagResult > FPropertyBagArrayRef::GetValueFloat ( const int32  Index) const

◆ GetValueInt32()

TValueOrError< int32, EPropertyBagResult > FPropertyBagArrayRef::GetValueInt32 ( const int32  Index) const

◆ GetValueInt64()

TValueOrError< int64, EPropertyBagResult > FPropertyBagArrayRef::GetValueInt64 ( const int32  Index) const

◆ GetValueName()

TValueOrError< FName, EPropertyBagResult > FPropertyBagArrayRef::GetValueName ( const int32  Index) const

◆ GetValueObject() [1/2]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FPropertyBagArrayRef::GetValueObject ( const int32  Index) const
inline
Returns
object pointer value of specified type.

◆ GetValueObject() [2/2]

TValueOrError< UObject *, EPropertyBagResult > FPropertyBagArrayRef::GetValueObject ( const int32  Index,
const UClass RequestedClass = nullptr 
) const

◆ GetValueSoftPath()

TValueOrError< FSoftObjectPath, EPropertyBagResult > FPropertyBagArrayRef::GetValueSoftPath ( const int32  Index) const

◆ GetValueString()

TValueOrError< FString, EPropertyBagResult > FPropertyBagArrayRef::GetValueString ( const int32  Index) const

◆ GetValueStruct() [1/2]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FPropertyBagArrayRef::GetValueStruct ( const int32  Index) const
inline
Returns
struct reference of specified type.

◆ GetValueStruct() [2/2]

TValueOrError< FStructView, EPropertyBagResult > FPropertyBagArrayRef::GetValueStruct ( const int32  Index,
const UScriptStruct RequestedStruct = nullptr 
) const

◆ GetValueText()

TValueOrError< FText, EPropertyBagResult > FPropertyBagArrayRef::GetValueText ( const int32  Index) const

◆ GetValueUInt32()

TValueOrError< uint32, EPropertyBagResult > FPropertyBagArrayRef::GetValueUInt32 ( const int32  Index) const

◆ GetValueUInt64()

TValueOrError< uint64, EPropertyBagResult > FPropertyBagArrayRef::GetValueUInt64 ( const int32  Index) const

◆ SetValueBool()

EPropertyBagResult FPropertyBagArrayRef::SetValueBool ( const int32  Index,
const bool  bInValue 
)

Value Setters. A property must exist in that bag before it can be set.
Numeric types (bool, (u)int32, (u)int64, float, double) support type conversion.

◆ SetValueByte()

EPropertyBagResult FPropertyBagArrayRef::SetValueByte ( const int32  Index,
const uint8  InValue 
)

◆ SetValueClass()

EPropertyBagResult FPropertyBagArrayRef::SetValueClass ( const int32  Index,
UClass InValue 
)

◆ SetValueDouble()

EPropertyBagResult FPropertyBagArrayRef::SetValueDouble ( const int32  Index,
const double  InValue 
)

◆ SetValueEnum() [1/2]

template<typename T >
EPropertyBagResult FPropertyBagArrayRef::SetValueEnum ( const int32  Index,
const T  InValue 
)
inline

Sets enum value specified type.

◆ SetValueEnum() [2/2]

EPropertyBagResult FPropertyBagArrayRef::SetValueEnum ( const int32  Index,
const uint8  InValue,
const UEnum Enum 
)

◆ SetValueFloat()

EPropertyBagResult FPropertyBagArrayRef::SetValueFloat ( const int32  Index,
const float  InValue 
)

◆ SetValueInt32()

EPropertyBagResult FPropertyBagArrayRef::SetValueInt32 ( const int32  Index,
const int32  InValue 
)

◆ SetValueInt64()

EPropertyBagResult FPropertyBagArrayRef::SetValueInt64 ( const int32  Index,
const int64  InValue 
)

◆ SetValueName()

EPropertyBagResult FPropertyBagArrayRef::SetValueName ( const int32  Index,
const FName  InValue 
)

◆ SetValueObject() [1/2]

template<typename T >
EPropertyBagResult FPropertyBagArrayRef::SetValueObject ( const int32  Index,
T *  InValue 
)
inline

Sets object pointer value specified type.

◆ SetValueObject() [2/2]

EPropertyBagResult FPropertyBagArrayRef::SetValueObject ( const int32  Index,
UObject InValue 
)

◆ SetValueSoftPath() [1/2]

EPropertyBagResult FPropertyBagArrayRef::SetValueSoftPath ( const int32  Index,
const FSoftObjectPath InValue 
)

◆ SetValueSoftPath() [2/2]

EPropertyBagResult FPropertyBagArrayRef::SetValueSoftPath ( const int32  Index,
const UObject InValue 
)

◆ SetValueString()

EPropertyBagResult FPropertyBagArrayRef::SetValueString ( const int32  Index,
const FString &  InValue 
)

◆ SetValueStruct() [1/2]

template<typename T >
EPropertyBagResult FPropertyBagArrayRef::SetValueStruct ( const int32  Index,
const T &  InValue 
)
inline

Sets struct value specified type.

◆ SetValueStruct() [2/2]

EPropertyBagResult FPropertyBagArrayRef::SetValueStruct ( const int32  Index,
FConstStructView  InValue 
)

◆ SetValueText()

EPropertyBagResult FPropertyBagArrayRef::SetValueText ( const int32  Index,
const FText InValue 
)

◆ SetValueUInt32()

EPropertyBagResult FPropertyBagArrayRef::SetValueUInt32 ( const int32  Index,
const uint32  InValue 
)

◆ SetValueUInt64()

EPropertyBagResult FPropertyBagArrayRef::SetValueUInt64 ( const int32  Index,
const uint64  InValue 
)

The documentation for this class was generated from the following files: