UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FInstancedPropertyBag Struct Reference

#include <PropertyBag.h>

Public Member Functions

 FInstancedPropertyBag ()=default
 
 FInstancedPropertyBag (const FInstancedPropertyBag &Other)=default
 
 FInstancedPropertyBag (FInstancedPropertyBag &&Other)=default
 
FInstancedPropertyBagoperator= (const FInstancedPropertyBag &InOther)=default
 
FInstancedPropertyBagoperator= (FInstancedPropertyBag &&InOther)=default
 
bool IsValid () const
 
void Reset ()
 
UE_API void InitializeFromBagStruct (const UPropertyBag *NewBagStruct)
 
UE_API void CopyMatchingValuesByID (const FInstancedPropertyBag &Other, TOptional< TConstArrayView< FGuid > > OptionalPropertyIdsSubset={})
 
UE_API void CopyMatchingValuesByName (const FInstancedPropertyBag &Other, TOptional< TConstArrayView< FName > > OptionalPropertyNamesSubset={})
 
UE_API int32 GetNumPropertiesInBag () const
 
UE_API EPropertyBagAlterationResult AddProperties (const TConstArrayView< FPropertyBagPropertyDesc > Descs, bool bOverwrite=true)
 
UE_API EPropertyBagAlterationResult AddProperty (const FName InName, const EPropertyBagPropertyType InValueType, const UObject *InValueTypeObject=nullptr, bool bOverwrite=true)
 
UE_API EPropertyBagAlterationResult AddContainerProperty (const FName InName, const EPropertyBagContainerType InContainerType, const EPropertyBagPropertyType InValueType, const UObject *InValueTypeObject=nullptr, bool bOverwrite=true)
 
UE_API EPropertyBagAlterationResult AddContainerProperty (const FName InName, const FPropertyBagContainerTypes InContainerTypes, const EPropertyBagPropertyType InValueType, UObject *InValueTypeObject, bool bOverwrite=true)
 
UE_API EPropertyBagAlterationResult AddProperty (const FName InName, const FProperty *InSourceProperty, bool bOverwrite=true)
 
UE_API EPropertyBagAlterationResult DuplicateProperty (FName InName, FName *InOutNewName=nullptr)
 
UE_API EPropertyBagResult ReplaceAllPropertiesAndValues (const TConstArrayView< FPropertyBagPropertyDesc > InDescs, const TConstArrayView< TConstArrayView< uint8 > > InValues)
 
UE_API EPropertyBagAlterationResult RemovePropertiesByName (const TConstArrayView< FName > PropertiesToRemove)
 
UE_API EPropertyBagAlterationResult RemovePropertyByName (const FName PropertyToRemove)
 
UE_API EPropertyBagAlterationResult RenameProperty (FName PropertyToRename, FName NewName)
 
UE_API EPropertyBagAlterationResult ReorderProperty (FName SourcePropertyName, FName TargetPropertyName, bool bInsertBefore=true)
 
UE_API EPropertyBagAlterationResult ReorderProperty (int32 SourcePropertyIndex, int32 TargetPropertyIndex, bool bInsertBefore=true)
 
UE_API void MigrateToNewBagStruct (const UPropertyBag *NewBagStruct)
 
UE_API void MigrateToNewBagInstance (const FInstancedPropertyBag &InNewBagInstance)
 
UE_API void MigrateToNewBagInstanceWithOverrides (const FInstancedPropertyBag &InNewBagInstance, TConstArrayView< FGuid > OverriddenPropertyIDs)
 
UE_API const UPropertyBagGetPropertyBagStruct () const
 
UE_API const FPropertyBagPropertyDescFindPropertyDescByID (const FGuid ID) const
 
UE_API const FPropertyBagPropertyDescFindPropertyDescByName (const FName Name) const
 
UE_API bool OwnsPropertyDesc (const FPropertyBagPropertyDesc &Desc) const
 
UE_API bool HasSameLayout (const FInstancedPropertyBag &Other) const
 
FConstStructView GetValue () const
 
FStructView GetMutableValue ()
 
UE_API FInstancedStruct Detach ()
 
UE_API TValueOrError< bool, EPropertyBagResultGetValueBool (const FName Name) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueByte (const FName Name) const
 
UE_API TValueOrError< int32, EPropertyBagResultGetValueInt32 (const FName Name) const
 
UE_API TValueOrError< uint32, EPropertyBagResultGetValueUInt32 (const FName Name) const
 
UE_API TValueOrError< int64, EPropertyBagResultGetValueInt64 (const FName Name) const
 
UE_API TValueOrError< uint64, EPropertyBagResultGetValueUInt64 (const FName Name) const
 
UE_API TValueOrError< float, EPropertyBagResultGetValueFloat (const FName Name) const
 
UE_API TValueOrError< double, EPropertyBagResultGetValueDouble (const FName Name) const
 
UE_API TValueOrError< FName, EPropertyBagResultGetValueName (const FName Name) const
 
UE_API TValueOrError< FString, EPropertyBagResultGetValueString (const FName Name) const
 
UE_API TValueOrError< FText, EPropertyBagResultGetValueText (const FName Name) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueEnum (const FName Name, const UEnum *RequestedEnum) const
 
UE_API TValueOrError< FStructView, EPropertyBagResultGetValueStruct (const FName Name, const UScriptStruct *RequestedStruct=nullptr) const
 
UE_API TValueOrError< UObject *, EPropertyBagResultGetValueObject (const FName Name, const UClass *RequestedClass=nullptr) const
 
UE_API TValueOrError< UClass *, EPropertyBagResultGetValueClass (const FName Name) const
 
UE_API TValueOrError< FSoftObjectPath, EPropertyBagResultGetValueSoftPath (const FName Name) const
 
UE_API TValueOrError< FString, EPropertyBagResultGetValueSerializedString (const FName Name) const
 
template<typename T >
TValueOrError< T, EPropertyBagResultGetValueEnum (const FName Name) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueStruct (const FName Name) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueObject (const FName Name) const
 
UE_API TValueOrError< bool, EPropertyBagResultGetValueBool (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueByte (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< int32, EPropertyBagResultGetValueInt32 (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< uint32, EPropertyBagResultGetValueUInt32 (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< int64, EPropertyBagResultGetValueInt64 (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< uint64, EPropertyBagResultGetValueUInt64 (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< float, EPropertyBagResultGetValueFloat (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< double, EPropertyBagResultGetValueDouble (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FName, EPropertyBagResultGetValueName (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FString, EPropertyBagResultGetValueString (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FText, EPropertyBagResultGetValueText (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< uint8, EPropertyBagResultGetValueEnum (const FPropertyBagPropertyDesc &Desc, const UEnum *RequestedEnum) const
 
UE_API TValueOrError< FStructView, EPropertyBagResultGetValueStruct (const FPropertyBagPropertyDesc &Desc, const UScriptStruct *RequestedStruct=nullptr) const
 
UE_API TValueOrError< UObject *, EPropertyBagResultGetValueObject (const FPropertyBagPropertyDesc &Desc, const UClass *RequestedClass=nullptr) const
 
UE_API TValueOrError< UClass *, EPropertyBagResultGetValueClass (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FSoftObjectPath, EPropertyBagResultGetValueSoftPath (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FPropertyBagArrayRef, EPropertyBagResultGetMutableArrayRef (const FPropertyBagPropertyDesc &Desc)
 
UE_API TValueOrError< const FPropertyBagArrayRef, EPropertyBagResultGetArrayRef (const FPropertyBagPropertyDesc &Desc) const
 
UE_API TValueOrError< FPropertyBagSetRef, EPropertyBagResultGetMutableSetRef (const FPropertyBagPropertyDesc &Desc)
 
UE_API TValueOrError< const FPropertyBagSetRef, EPropertyBagResultGetSetRef (const FPropertyBagPropertyDesc &Desc) const
 
template<typename T >
TValueOrError< T, EPropertyBagResultGetValueEnum (const FPropertyBagPropertyDesc &Desc) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueStruct (const FPropertyBagPropertyDesc &Desc) const
 
template<typename T >
TValueOrError< T *, EPropertyBagResultGetValueObject (const FPropertyBagPropertyDesc &Desc) const
 
UE_API EPropertyBagResult SetValueBool (const FName Name, const bool bInValue)
 
UE_API EPropertyBagResult SetValueByte (const FName Name, const uint8 InValue)
 
UE_API EPropertyBagResult SetValueInt32 (const FName Name, const int32 InValue)
 
UE_API EPropertyBagResult SetValueUInt32 (const FName Name, const uint32 InValue)
 
UE_API EPropertyBagResult SetValueInt64 (const FName Name, const int64 InValue)
 
UE_API EPropertyBagResult SetValueUInt64 (const FName Name, const uint64 InValue)
 
UE_API EPropertyBagResult SetValueFloat (const FName Name, const float InValue)
 
UE_API EPropertyBagResult SetValueDouble (const FName Name, const double InValue)
 
UE_API EPropertyBagResult SetValueName (const FName Name, const FName InValue)
 
UE_API EPropertyBagResult SetValueString (const FName Name, const FString &InValue)
 
UE_API EPropertyBagResult SetValueText (const FName Name, const FText &InValue)
 
UE_API EPropertyBagResult SetValueEnum (const FName Name, const uint8 InValue, const UEnum *Enum)
 
UE_API EPropertyBagResult SetValueStruct (const FName Name, FConstStructView InValue)
 
UE_API EPropertyBagResult SetValueObject (const FName Name, UObject *InValue)
 
UE_API EPropertyBagResult SetValueClass (const FName Name, UClass *InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const FName Name, const FSoftObjectPath &InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const FName Name, const UObject *InValue)
 
UE_API EPropertyBagResult SetValueSerializedString (const FName Name, const FString &InValue)
 
template<typename T >
EPropertyBagResult SetValueEnum (const FName Name, const T InValue)
 
template<typename T >
EPropertyBagResult SetValueStruct (const FName Name, const T &InValue)
 
template<typename T >
EPropertyBagResult SetValueObject (const FName Name, T *InValue)
 
UE_API EPropertyBagResult SetValue (const FName Name, const FProperty *InSourceProperty, const void *InSourceContainerAddress)
 
UE_API EPropertyBagResult SetValueBool (const FPropertyBagPropertyDesc &Desc, const bool bInValue)
 
UE_API EPropertyBagResult SetValueByte (const FPropertyBagPropertyDesc &Desc, const uint8 InValue)
 
UE_API EPropertyBagResult SetValueInt32 (const FPropertyBagPropertyDesc &Desc, const int32 InValue)
 
UE_API EPropertyBagResult SetValueUInt32 (const FPropertyBagPropertyDesc &Desc, const uint32 InValue)
 
UE_API EPropertyBagResult SetValueInt64 (const FPropertyBagPropertyDesc &Desc, const int64 InValue)
 
UE_API EPropertyBagResult SetValueUInt64 (const FPropertyBagPropertyDesc &Desc, const uint64 InValue)
 
UE_API EPropertyBagResult SetValueFloat (const FPropertyBagPropertyDesc &Desc, const float InValue)
 
UE_API EPropertyBagResult SetValueDouble (const FPropertyBagPropertyDesc &Desc, const double InValue)
 
UE_API EPropertyBagResult SetValueName (const FPropertyBagPropertyDesc &Desc, const FName InValue)
 
UE_API EPropertyBagResult SetValueString (const FPropertyBagPropertyDesc &Desc, const FString &InValue)
 
UE_API EPropertyBagResult SetValueText (const FPropertyBagPropertyDesc &Desc, const FText &InValue)
 
UE_API EPropertyBagResult SetValueEnum (const FPropertyBagPropertyDesc &Desc, const uint8 InValue, const UEnum *Enum)
 
UE_API EPropertyBagResult SetValueStruct (const FPropertyBagPropertyDesc &Desc, FConstStructView InValue)
 
UE_API EPropertyBagResult SetValueObject (const FPropertyBagPropertyDesc &Desc, UObject *InValue)
 
UE_API EPropertyBagResult SetValueClass (const FPropertyBagPropertyDesc &Desc, UClass *InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const FPropertyBagPropertyDesc &Desc, const FSoftObjectPath &InValue)
 
UE_API EPropertyBagResult SetValueSoftPath (const FPropertyBagPropertyDesc &Desc, const UObject *InValue)
 
template<typename T >
EPropertyBagResult SetValueEnum (const FPropertyBagPropertyDesc &Desc, const T InValue)
 
template<typename T >
EPropertyBagResult SetValueStruct (const FPropertyBagPropertyDesc &Desc, const T &InValue)
 
template<typename T >
EPropertyBagResult SetValueObject (const FPropertyBagPropertyDesc &Desc, T *InValue)
 
UE_API TValueOrError< FPropertyBagArrayRef, EPropertyBagResultGetMutableArrayRef (const FName Name)
 
UE_API TValueOrError< const FPropertyBagArrayRef, EPropertyBagResultGetArrayRef (const FName Name) const
 
UE_API TValueOrError< FPropertyBagSetRef, EPropertyBagResultGetMutableSetRef (const FName Name)
 
UE_API TValueOrError< const FPropertyBagSetRef, EPropertyBagResultGetSetRef (const FName Name) const
 
UE_API bool Identical (const FInstancedPropertyBag *Other, uint32 PortFlags) const
 
UE_API bool Serialize (FArchive &Ar)
 
UE_API void AddStructReferencedObjects (FReferenceCollector &Collector)
 
UE_API void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 

Static Public Member Functions

static UE_API bool IsPropertyNameValid (const FString &Name)
 
static UE_API bool IsPropertyNameValid (const FName Name)
 
static UE_API FName SanitizePropertyName (const FString &Name, const TCHAR ReplacementChar=TEXT('_'))
 
static UE_API FName SanitizePropertyName (FName Name, const TCHAR ReplacementChar=TEXT('_'))
 

Protected Member Functions

UE_API const voidGetValueAddress (const FPropertyBagPropertyDesc *Desc) const
 
UE_API voidGetMutableValueAddress (const FPropertyBagPropertyDesc *Desc)
 

Protected Attributes

FInstancedStruct Value
 

Constructor & Destructor Documentation

◆ FInstancedPropertyBag() [1/3]

FInstancedPropertyBag::FInstancedPropertyBag ( )
default

◆ FInstancedPropertyBag() [2/3]

FInstancedPropertyBag::FInstancedPropertyBag ( const FInstancedPropertyBag Other)
default

◆ FInstancedPropertyBag() [3/3]

FInstancedPropertyBag::FInstancedPropertyBag ( FInstancedPropertyBag &&  Other)
default

Member Function Documentation

◆ AddContainerProperty() [1/2]

EPropertyBagAlterationResult FInstancedPropertyBag::AddContainerProperty ( const FName  InName,
const EPropertyBagContainerType  InContainerType,
const EPropertyBagPropertyType  InValueType,
const UObject InValueTypeObject = nullptr,
bool  bOverwrite = true 
)

Adds a new container property to the bag. If property of same name already exists, it will be replaced with the new type.

Parameters
InNameName of the new property
InContainerTypeType of the new container
InValueTypeType of the new property
InValueTypeObjectType object (for struct, class, enum) of the new property
bOverwriteOverwrite the property if it already exists.
Returns
The result of the alteration.

◆ AddContainerProperty() [2/2]

EPropertyBagAlterationResult FInstancedPropertyBag::AddContainerProperty ( const FName  InName,
const FPropertyBagContainerTypes  InContainerTypes,
const EPropertyBagPropertyType  InValueType,
UObject InValueTypeObject,
bool  bOverwrite = true 
)

Adds a new container property to the bag. If property of same name already exists, it will be replaced with the new type.

Parameters
InNameName of the new property
InContainerTypesList of (optionally nested) containers to create
InValueTypeType of the new property
InValueTypeObjectType object (for struct, class, enum) of the new property
bOverwriteOverwrite the property if it already exists.
Returns
The result of the alteration.

◆ AddProperties()

EPropertyBagAlterationResult FInstancedPropertyBag::AddProperties ( const TConstArrayView< FPropertyBagPropertyDesc Descs,
bool  bOverwrite = true 
)

Adds properties to the bag. If property of same name already exists, it will be replaced with the new type. Numeric property values will be converted if possible, when a property's type changes.

Parameters
DescsDescriptors of new properties to add.
bOverwriteOverwrite the property if it already exists.
Returns
The result of the alteration.

◆ AddProperty() [1/2]

EPropertyBagAlterationResult FInstancedPropertyBag::AddProperty ( const FName  InName,
const EPropertyBagPropertyType  InValueType,
const UObject InValueTypeObject = nullptr,
bool  bOverwrite = true 
)

Adds a new property to the bag. If property of same name already exists, it will be replaced with the new type. Numeric property values will be converted if possible, when a property's type changes.

Parameters
InNameName of the new property
InValueTypeType of the new property
InValueTypeObjectType object (for struct, class, enum) of the new property
bOverwriteOverwrite the property if it already exists.
Returns
The result of the alteration.

◆ AddProperty() [2/2]

EPropertyBagAlterationResult FInstancedPropertyBag::AddProperty ( const FName  InName,
const FProperty InSourceProperty,
bool  bOverwrite = true 
)

Adds a new property to the bag. Property type duplicated from source property to. If property of same name already exists, it will be replaced with the new type.

Parameters
InNameName of the property to add
InSourcePropertyThe property to add
bOverwriteOverwrite the property if it already exists.
Returns
The result of the alteration.

◆ AddStructReferencedObjects()

void FInstancedPropertyBag::AddStructReferencedObjects ( FReferenceCollector Collector)

◆ CopyMatchingValuesByID()

void FInstancedPropertyBag::CopyMatchingValuesByID ( const FInstancedPropertyBag Other,
TOptional< TConstArrayView< FGuid > >  OptionalPropertyIdsSubset = {} 
)

Copies matching property values from another bag of potentially mismatching layout. The properties are matched between the bags based on the property ID.

Parameters
OtherReference to the bag to copy the values from
OptionalPropertyIdsSubsetOptional array of property ids subset to copy from NewDescs

◆ CopyMatchingValuesByName()

void FInstancedPropertyBag::CopyMatchingValuesByName ( const FInstancedPropertyBag Other,
TOptional< TConstArrayView< FName > >  OptionalPropertyNamesSubset = {} 
)

Copies matching property values from another bag of potentially mismatching layout. The properties are matched between the bags based on the property name.

Parameters
OtherReference to the bag to copy the values from
OptionalPropertyNamesSubsetOptional array of property names subset to copy from Other

◆ Detach()

FInstancedStruct FInstancedPropertyBag::Detach ( )

Return Internal instanced struct to be able to take ownership on the internal memory of this instanced property bag. Internal value will be reset to invalid state.

◆ DuplicateProperty()

EPropertyBagAlterationResult FInstancedPropertyBag::DuplicateProperty ( FName  InName,
FName InOutNewName = nullptr 
)

Duplicates the given property in the bag if it exists.

Parameters
InNameName of the existing property
InOutNewNameName of the new property

◆ FindPropertyDescByID()

const FPropertyBagPropertyDesc * FInstancedPropertyBag::FindPropertyDescByID ( const FGuid  ID) const

Returns property descriptor by specified name.

◆ FindPropertyDescByName()

const FPropertyBagPropertyDesc * FInstancedPropertyBag::FindPropertyDescByName ( const FName  Name) const

Returns property descriptor by specified ID.

◆ GetArrayRef() [1/2]

TValueOrError< const FPropertyBagArrayRef, EPropertyBagResult > FInstancedPropertyBag::GetArrayRef ( const FName  Name) const

Returns helper class to access an array property. 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

◆ GetArrayRef() [2/2]

TValueOrError< const FPropertyBagArrayRef, EPropertyBagResult > FInstancedPropertyBag::GetArrayRef ( const FPropertyBagPropertyDesc Desc) const

◆ GetMutableArrayRef() [1/2]

TValueOrError< FPropertyBagArrayRef, EPropertyBagResult > FInstancedPropertyBag::GetMutableArrayRef ( const FName  Name)

Returns helper class to modify and access an array property. 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

◆ GetMutableArrayRef() [2/2]

TValueOrError< FPropertyBagArrayRef, EPropertyBagResult > FInstancedPropertyBag::GetMutableArrayRef ( const FPropertyBagPropertyDesc Desc)

◆ GetMutableSetRef() [1/2]

TValueOrError< FPropertyBagSetRef, EPropertyBagResult > FInstancedPropertyBag::GetMutableSetRef ( const FName  Name)

Returns helper class to modify and access a set property. Note: The set reference is not valid after the layout of the referenced property bag has changed!

Returns
helper class to modify and access sets

◆ GetMutableSetRef() [2/2]

TValueOrError< FPropertyBagSetRef, EPropertyBagResult > FInstancedPropertyBag::GetMutableSetRef ( const FPropertyBagPropertyDesc Desc)

◆ GetMutableValue()

FStructView FInstancedPropertyBag::GetMutableValue ( )
inline
Returns
const view to the struct that holds the values. NOTE: The returned value/view cannot be serialized, use this to access the struct only temporarily.

◆ GetMutableValueAddress()

void * FInstancedPropertyBag::GetMutableValueAddress ( const FPropertyBagPropertyDesc Desc)
protected

◆ GetNumPropertiesInBag()

int32 FInstancedPropertyBag::GetNumPropertiesInBag ( ) const

Returns number of the Properties in this Property Bag

◆ GetPreloadDependencies()

void FInstancedPropertyBag::GetPreloadDependencies ( TArray< UObject * > &  OutDeps)

◆ GetPropertyBagStruct()

const UPropertyBag * FInstancedPropertyBag::GetPropertyBagStruct ( ) const
Returns
pointer to the property bag struct.

◆ GetSetRef() [1/2]

TValueOrError< const FPropertyBagSetRef, EPropertyBagResult > FInstancedPropertyBag::GetSetRef ( const FName  Name) const

Returns helper class to access a set property. Note: The set reference is not valid after the layout of the referenced property bag has changed!

Returns
helper class to modify and access sets

◆ GetSetRef() [2/2]

TValueOrError< const FPropertyBagSetRef, EPropertyBagResult > FInstancedPropertyBag::GetSetRef ( const FPropertyBagPropertyDesc Desc) const

◆ GetValue()

FConstStructView FInstancedPropertyBag::GetValue ( ) const
inline
Returns
const view to the struct that holds the values. NOTE: The returned value/view cannot be serialized, use this to access the struct only temporarily.

◆ GetValueAddress()

const void * FInstancedPropertyBag::GetValueAddress ( const FPropertyBagPropertyDesc Desc) const
protected

◆ GetValueBool() [1/2]

TValueOrError< bool, EPropertyBagResult > FInstancedPropertyBag::GetValueBool ( const FName  Name) const

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

◆ GetValueBool() [2/2]

TValueOrError< bool, EPropertyBagResult > FInstancedPropertyBag::GetValueBool ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueByte() [1/2]

TValueOrError< uint8, EPropertyBagResult > FInstancedPropertyBag::GetValueByte ( const FName  Name) const

◆ GetValueByte() [2/2]

TValueOrError< uint8, EPropertyBagResult > FInstancedPropertyBag::GetValueByte ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueClass() [1/2]

TValueOrError< UClass *, EPropertyBagResult > FInstancedPropertyBag::GetValueClass ( const FName  Name) const

◆ GetValueClass() [2/2]

TValueOrError< UClass *, EPropertyBagResult > FInstancedPropertyBag::GetValueClass ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueDouble() [1/2]

TValueOrError< double, EPropertyBagResult > FInstancedPropertyBag::GetValueDouble ( const FName  Name) const

◆ GetValueDouble() [2/2]

TValueOrError< double, EPropertyBagResult > FInstancedPropertyBag::GetValueDouble ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueEnum() [1/4]

template<typename T >
TValueOrError< T, EPropertyBagResult > FInstancedPropertyBag::GetValueEnum ( const FName  Name) const
inline
Returns
enum value of specified type.

◆ GetValueEnum() [2/4]

TValueOrError< uint8, EPropertyBagResult > FInstancedPropertyBag::GetValueEnum ( const FName  Name,
const UEnum RequestedEnum 
) const

◆ GetValueEnum() [3/4]

template<typename T >
TValueOrError< T, EPropertyBagResult > FInstancedPropertyBag::GetValueEnum ( const FPropertyBagPropertyDesc Desc) const
inline
Returns
enum value of specified type.

◆ GetValueEnum() [4/4]

TValueOrError< uint8, EPropertyBagResult > FInstancedPropertyBag::GetValueEnum ( const FPropertyBagPropertyDesc Desc,
const UEnum RequestedEnum 
) const

◆ GetValueFloat() [1/2]

TValueOrError< float, EPropertyBagResult > FInstancedPropertyBag::GetValueFloat ( const FName  Name) const

◆ GetValueFloat() [2/2]

TValueOrError< float, EPropertyBagResult > FInstancedPropertyBag::GetValueFloat ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueInt32() [1/2]

TValueOrError< int32, EPropertyBagResult > FInstancedPropertyBag::GetValueInt32 ( const FName  Name) const

◆ GetValueInt32() [2/2]

TValueOrError< int32, EPropertyBagResult > FInstancedPropertyBag::GetValueInt32 ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueInt64() [1/2]

TValueOrError< int64, EPropertyBagResult > FInstancedPropertyBag::GetValueInt64 ( const FName  Name) const

◆ GetValueInt64() [2/2]

TValueOrError< int64, EPropertyBagResult > FInstancedPropertyBag::GetValueInt64 ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueName() [1/2]

TValueOrError< FName, EPropertyBagResult > FInstancedPropertyBag::GetValueName ( const FName  Name) const

◆ GetValueName() [2/2]

TValueOrError< FName, EPropertyBagResult > FInstancedPropertyBag::GetValueName ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueObject() [1/4]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FInstancedPropertyBag::GetValueObject ( const FName  Name) const
inline
Returns
object pointer value of specified type.

◆ GetValueObject() [2/4]

TValueOrError< UObject *, EPropertyBagResult > FInstancedPropertyBag::GetValueObject ( const FName  Name,
const UClass RequestedClass = nullptr 
) const

◆ GetValueObject() [3/4]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FInstancedPropertyBag::GetValueObject ( const FPropertyBagPropertyDesc Desc) const
inline
Returns
object pointer value of specified type.

◆ GetValueObject() [4/4]

TValueOrError< UObject *, EPropertyBagResult > FInstancedPropertyBag::GetValueObject ( const FPropertyBagPropertyDesc Desc,
const UClass RequestedClass = nullptr 
) const

◆ GetValueSerializedString()

TValueOrError< FString, EPropertyBagResult > FInstancedPropertyBag::GetValueSerializedString ( const FName  Name) const
Returns
string-based serialized representation of the value.

◆ GetValueSoftPath() [1/2]

TValueOrError< FSoftObjectPath, EPropertyBagResult > FInstancedPropertyBag::GetValueSoftPath ( const FName  Name) const

◆ GetValueSoftPath() [2/2]

TValueOrError< FSoftObjectPath, EPropertyBagResult > FInstancedPropertyBag::GetValueSoftPath ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueString() [1/2]

TValueOrError< FString, EPropertyBagResult > FInstancedPropertyBag::GetValueString ( const FName  Name) const

◆ GetValueString() [2/2]

TValueOrError< FString, EPropertyBagResult > FInstancedPropertyBag::GetValueString ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueStruct() [1/4]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FInstancedPropertyBag::GetValueStruct ( const FName  Name) const
inline
Returns
struct reference of specified type.

◆ GetValueStruct() [2/4]

TValueOrError< FStructView, EPropertyBagResult > FInstancedPropertyBag::GetValueStruct ( const FName  Name,
const UScriptStruct RequestedStruct = nullptr 
) const

◆ GetValueStruct() [3/4]

template<typename T >
TValueOrError< T *, EPropertyBagResult > FInstancedPropertyBag::GetValueStruct ( const FPropertyBagPropertyDesc Desc) const
inline
Returns
struct reference of specified type.

◆ GetValueStruct() [4/4]

TValueOrError< FStructView, EPropertyBagResult > FInstancedPropertyBag::GetValueStruct ( const FPropertyBagPropertyDesc Desc,
const UScriptStruct RequestedStruct = nullptr 
) const

◆ GetValueText() [1/2]

TValueOrError< FText, EPropertyBagResult > FInstancedPropertyBag::GetValueText ( const FName  Name) const

◆ GetValueText() [2/2]

TValueOrError< FText, EPropertyBagResult > FInstancedPropertyBag::GetValueText ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueUInt32() [1/2]

TValueOrError< uint32, EPropertyBagResult > FInstancedPropertyBag::GetValueUInt32 ( const FName  Name) const

◆ GetValueUInt32() [2/2]

TValueOrError< uint32, EPropertyBagResult > FInstancedPropertyBag::GetValueUInt32 ( const FPropertyBagPropertyDesc Desc) const

◆ GetValueUInt64() [1/2]

TValueOrError< uint64, EPropertyBagResult > FInstancedPropertyBag::GetValueUInt64 ( const FName  Name) const

◆ GetValueUInt64() [2/2]

TValueOrError< uint64, EPropertyBagResult > FInstancedPropertyBag::GetValueUInt64 ( const FPropertyBagPropertyDesc Desc) const

◆ HasSameLayout()

bool FInstancedPropertyBag::HasSameLayout ( const FInstancedPropertyBag Other) const

Returns true if our propertybag has the same layout & per property types as another propertybag.

◆ Identical()

bool FInstancedPropertyBag::Identical ( const FInstancedPropertyBag Other,
uint32  PortFlags 
) const

◆ InitializeFromBagStruct()

void FInstancedPropertyBag::InitializeFromBagStruct ( const UPropertyBag NewBagStruct)

Initializes the instance from a bag struct.

◆ IsPropertyNameValid() [1/2]

bool FInstancedPropertyBag::IsPropertyNameValid ( const FName  Name)
static

Checks whether a provided name is a valid property bag name to create a new property bag property. Note: Some characters are allowed that are still invalid, but for workflow reasons they are acceptable and should still be sanitized to remove them when adding to the property bag, ex. spaces.

Parameters
NameThe name to check for invalid characters.
Returns
True if the property name is void of any strictly invalid characters.

◆ IsPropertyNameValid() [2/2]

bool FInstancedPropertyBag::IsPropertyNameValid ( const FString &  Name)
static

Checks whether a provided name is a valid property bag name to create a new property bag property. Note: Some characters are allowed that are still invalid, but for workflow reasons they are acceptable and should still be sanitized to remove them when adding to the property bag, ex. spaces.

Parameters
NameThe name to check for invalid characters.
Returns
True if the property name is void of any strictly invalid characters.

◆ IsValid()

bool FInstancedPropertyBag::IsValid ( ) const
inline
Returns
true if the instance contains data.

◆ MigrateToNewBagInstance()

void FInstancedPropertyBag::MigrateToNewBagInstance ( const FInstancedPropertyBag InNewBagInstance)

Changes the type of this bag to the InNewBagInstance, and migrates existing values over. Properties that do not exist in this bag will get values from NewBagInstance. The properties are matched between the bags based on the property ID.

Parameters
InNewBagInstanceNew bag composition and values used for new properties.

◆ MigrateToNewBagInstanceWithOverrides()

void FInstancedPropertyBag::MigrateToNewBagInstanceWithOverrides ( const FInstancedPropertyBag InNewBagInstance,
TConstArrayView< FGuid OverriddenPropertyIDs 
)

Changes the type of this bag to the InNewBagInstance, and migrates existing values over if marked as overridden in the OverriddenPropertyIDs. Properties that does not exist in this bag, or are not overridden, will get values from InNewBagInstance. The properties are matched between the bags based on the property ID.

Parameters
InNewBagInstanceNew bag composition and values used for new properties.
OverriddenPropertyIDsArray if property IDs which should be copied over to the new instance.

◆ MigrateToNewBagStruct()

void FInstancedPropertyBag::MigrateToNewBagStruct ( const UPropertyBag NewBagStruct)

Changes the type of this bag and migrates existing values. The properties are matched between the bags based on the property ID.

Parameters
NewBagStructPointer to the new type.

◆ operator=() [1/2]

FInstancedPropertyBag & FInstancedPropertyBag::operator= ( const FInstancedPropertyBag InOther)
default

◆ operator=() [2/2]

FInstancedPropertyBag & FInstancedPropertyBag::operator= ( FInstancedPropertyBag &&  InOther)
default

◆ OwnsPropertyDesc()

bool FInstancedPropertyBag::OwnsPropertyDesc ( const FPropertyBagPropertyDesc Desc) const

Returns true if we own the supplied property description, false otherwise.

◆ RemovePropertiesByName()

EPropertyBagAlterationResult FInstancedPropertyBag::RemovePropertiesByName ( const TConstArrayView< FName PropertiesToRemove)

Removes properties from the bag by name if they exist.

Parameters
PropertiesToRemoveThe names of the properties to remove.
Returns
The result of the alteration.

◆ RemovePropertyByName()

EPropertyBagAlterationResult FInstancedPropertyBag::RemovePropertyByName ( const FName  PropertyToRemove)

Removes a property from the bag by name if it exists.

Parameters
PropertyToRemoveThe name of the property to remove.
Returns
The result of the alteration.

◆ RenameProperty()

EPropertyBagAlterationResult FInstancedPropertyBag::RenameProperty ( FName  PropertyToRename,
FName  NewName 
)

Renames a property in the bag if it exists.

Parameters
PropertyToRenameThe name of the property to rename
NewNameThe new name of the property
Returns
The result of the alteration

◆ ReorderProperty() [1/2]

EPropertyBagAlterationResult FInstancedPropertyBag::ReorderProperty ( FName  SourcePropertyName,
FName  TargetPropertyName,
bool  bInsertBefore = true 
)

Reorders a property either before or after another target property.

Parameters
SourcePropertyNameThe source property to insert elsewhere in the array.
TargetPropertyNameThe target property to conduct the reorder around (before or after).
bInsertBeforeInsert the source property before the target property. If false, it will be inserted after.
Returns
The result of the alteration.

◆ ReorderProperty() [2/2]

EPropertyBagAlterationResult FInstancedPropertyBag::ReorderProperty ( int32  SourcePropertyIndex,
int32  TargetPropertyIndex,
bool  bInsertBefore = true 
)

Reorders a property either before or after another target property.

Parameters
SourcePropertyIndexThe index of the source property to insert elsewhere in the array.
TargetPropertyIndexThe index of the target property to conduct the reorder around (before or after).
bInsertBeforeInsert the source property before the target property. If false, it will be inserted after.
Returns
The result of the alteration.

◆ ReplaceAllPropertiesAndValues()

EPropertyBagResult FInstancedPropertyBag::ReplaceAllPropertiesAndValues ( const TConstArrayView< FPropertyBagPropertyDesc InDescs,
const TConstArrayView< TConstArrayView< uint8 > >  InValues 
)

Clears all properties, then adds the supplied properties to the bag and sets their respective values. Numeric property values will be converted if possible, when a property's type changes.

Parameters
InDescsDescriptors of new properties to add. Must be the same size as InValues.
InValuesValues of new properties to add. Must be the same size as InDescs.

◆ Reset()

void FInstancedPropertyBag::Reset ( )
inline

Resets the instance to empty.

◆ SanitizePropertyName() [1/2]

FName FInstancedPropertyBag::SanitizePropertyName ( const FString &  Name,
const TCHAR  ReplacementChar = TEXT('_') 
)
static

Returns a sanitized version of the provided name without invalid characters.

Parameters
NameThe name to sanitize.
ReplacementCharWill replace invalid characters.
Returns
Potentially modified property name replacing invalid characters with the provided replacement.

◆ SanitizePropertyName() [2/2]

FName FInstancedPropertyBag::SanitizePropertyName ( FName  Name,
const TCHAR  ReplacementChar = TEXT('_') 
)
static

Returns a sanitized version of the provided name without invalid characters.

Parameters
NameThe name to sanitize.
ReplacementCharWill replace invalid characters.
Returns
Potentially modified property name replacing invalid characters with the provided replacement.

◆ Serialize()

bool FInstancedPropertyBag::Serialize ( FArchive Ar)

◆ SetValue()

EPropertyBagResult FInstancedPropertyBag::SetValue ( const FName  Name,
const FProperty InSourceProperty,
const void InSourceContainerAddress 
)

Sets property value from given source property and source container address A property must exist in that bag before it can be set.

◆ SetValueBool() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueBool ( const FName  Name,
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.

◆ SetValueBool() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueBool ( const FPropertyBagPropertyDesc Desc,
const bool  bInValue 
)

◆ SetValueByte() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueByte ( const FName  Name,
const uint8  InValue 
)

◆ SetValueByte() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueByte ( const FPropertyBagPropertyDesc Desc,
const uint8  InValue 
)

◆ SetValueClass() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueClass ( const FName  Name,
UClass InValue 
)

◆ SetValueClass() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueClass ( const FPropertyBagPropertyDesc Desc,
UClass InValue 
)

◆ SetValueDouble() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueDouble ( const FName  Name,
const double  InValue 
)

◆ SetValueDouble() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueDouble ( const FPropertyBagPropertyDesc Desc,
const double  InValue 
)

◆ SetValueEnum() [1/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueEnum ( const FName  Name,
const T  InValue 
)
inline

Sets enum value specified type.

◆ SetValueEnum() [2/4]

EPropertyBagResult FInstancedPropertyBag::SetValueEnum ( const FName  Name,
const uint8  InValue,
const UEnum Enum 
)

◆ SetValueEnum() [3/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueEnum ( const FPropertyBagPropertyDesc Desc,
const T  InValue 
)
inline

Sets enum value specified type.

◆ SetValueEnum() [4/4]

EPropertyBagResult FInstancedPropertyBag::SetValueEnum ( const FPropertyBagPropertyDesc Desc,
const uint8  InValue,
const UEnum Enum 
)

◆ SetValueFloat() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueFloat ( const FName  Name,
const float  InValue 
)

◆ SetValueFloat() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueFloat ( const FPropertyBagPropertyDesc Desc,
const float  InValue 
)

◆ SetValueInt32() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueInt32 ( const FName  Name,
const int32  InValue 
)

◆ SetValueInt32() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueInt32 ( const FPropertyBagPropertyDesc Desc,
const int32  InValue 
)

◆ SetValueInt64() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueInt64 ( const FName  Name,
const int64  InValue 
)

◆ SetValueInt64() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueInt64 ( const FPropertyBagPropertyDesc Desc,
const int64  InValue 
)

◆ SetValueName() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueName ( const FName  Name,
const FName  InValue 
)

◆ SetValueName() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueName ( const FPropertyBagPropertyDesc Desc,
const FName  InValue 
)

◆ SetValueObject() [1/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueObject ( const FName  Name,
T *  InValue 
)
inline

Sets object pointer value specified type.

◆ SetValueObject() [2/4]

EPropertyBagResult FInstancedPropertyBag::SetValueObject ( const FName  Name,
UObject InValue 
)

◆ SetValueObject() [3/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueObject ( const FPropertyBagPropertyDesc Desc,
T *  InValue 
)
inline

Sets object pointer value specified type.

◆ SetValueObject() [4/4]

EPropertyBagResult FInstancedPropertyBag::SetValueObject ( const FPropertyBagPropertyDesc Desc,
UObject InValue 
)

◆ SetValueSerializedString()

EPropertyBagResult FInstancedPropertyBag::SetValueSerializedString ( const FName  Name,
const FString &  InValue 
)

Sets property value from a serialized representation of the value. If the string value provided cannot be parsed by the property, the operation will fail.

◆ SetValueSoftPath() [1/4]

EPropertyBagResult FInstancedPropertyBag::SetValueSoftPath ( const FName  Name,
const FSoftObjectPath InValue 
)

◆ SetValueSoftPath() [2/4]

EPropertyBagResult FInstancedPropertyBag::SetValueSoftPath ( const FName  Name,
const UObject InValue 
)

◆ SetValueSoftPath() [3/4]

EPropertyBagResult FInstancedPropertyBag::SetValueSoftPath ( const FPropertyBagPropertyDesc Desc,
const FSoftObjectPath InValue 
)

◆ SetValueSoftPath() [4/4]

EPropertyBagResult FInstancedPropertyBag::SetValueSoftPath ( const FPropertyBagPropertyDesc Desc,
const UObject InValue 
)

◆ SetValueString() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueString ( const FName  Name,
const FString &  InValue 
)

◆ SetValueString() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueString ( const FPropertyBagPropertyDesc Desc,
const FString &  InValue 
)

◆ SetValueStruct() [1/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueStruct ( const FName  Name,
const T &  InValue 
)
inline

Sets struct value specified type.

◆ SetValueStruct() [2/4]

EPropertyBagResult FInstancedPropertyBag::SetValueStruct ( const FName  Name,
FConstStructView  InValue 
)

◆ SetValueStruct() [3/4]

template<typename T >
EPropertyBagResult FInstancedPropertyBag::SetValueStruct ( const FPropertyBagPropertyDesc Desc,
const T &  InValue 
)
inline

Sets struct value specified type.

◆ SetValueStruct() [4/4]

EPropertyBagResult FInstancedPropertyBag::SetValueStruct ( const FPropertyBagPropertyDesc Desc,
FConstStructView  InValue 
)

◆ SetValueText() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueText ( const FName  Name,
const FText InValue 
)

◆ SetValueText() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueText ( const FPropertyBagPropertyDesc Desc,
const FText InValue 
)

◆ SetValueUInt32() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueUInt32 ( const FName  Name,
const uint32  InValue 
)

◆ SetValueUInt32() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueUInt32 ( const FPropertyBagPropertyDesc Desc,
const uint32  InValue 
)

◆ SetValueUInt64() [1/2]

EPropertyBagResult FInstancedPropertyBag::SetValueUInt64 ( const FName  Name,
const uint64  InValue 
)

◆ SetValueUInt64() [2/2]

EPropertyBagResult FInstancedPropertyBag::SetValueUInt64 ( const FPropertyBagPropertyDesc Desc,
const uint64  InValue 
)

Member Data Documentation

◆ Value

FInstancedStruct FInstancedPropertyBag::Value
protected

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