Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/StructUtils
Inheritance Hierarchy
- FScriptSetHelper
- FPropertyBagSetRef
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/PropertyBag.h |
| Include | #include "StructUtils/PropertyBag.h" |
Syntax
class FPropertyBagSetRef : private FScriptSetHelper
Remarks
A reference to a set in FInstancedPropertyBag Contains helper methods to get and set properties. FInstancedPropertyBag Bag; Bag.AddProperties({ { SetName, EPropertyBagContainerType::Set, EPropertyBagPropertyType::Float } });
if (auto FloatSetRes = Bag.GetSetRef(ArrayName); FloatSetRes.IsValid()) { FPropertyBagSetRef& FloatSet = FloatSetRes.GetValue(); FloatSet.AddValueFloat(123.f); }
Note: The set reference is not valid after the layout of the referenced property bag has changed!
Constructors
| Type | Name | Description | |
|---|---|---|---|
FPropertyBagSetRef
(
const FPropertyBagPropertyDesc& InDesc, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| EPropertyBagResult | AddValueBool
(
const bool bInValue |
Add value to set. If value is already present, it will not be added | |
| EPropertyBagResult | AddValueByte
(
const uint8 InValue |
||
| EPropertyBagResult | AddValueClass
(
UClass* InValue |
||
| EPropertyBagResult | AddValueDouble
(
const double InValue |
||
| EPropertyBagResult | AddValueEnum
(
const int64 InValue, |
||
| EPropertyBagResult | AddValueEnum
(
const T InValue |
Adds enum value specified type. | |
| EPropertyBagResult | AddValueFloat
(
const float InValue |
||
| EPropertyBagResult | AddValueInt32
(
const int32 InValue |
||
| EPropertyBagResult | AddValueInt64
(
const int64 InValue |
||
| EPropertyBagResult | AddValueName
(
const FName InValue |
||
| EPropertyBagResult | AddValueObject
(
T* InValue |
Adds object pointer value specified type. | |
| EPropertyBagResult | AddValueObject
(
UObject* InValue |
||
| EPropertyBagResult | AddValueSoftPath
(
const FSoftObjectPath& InValue |
||
| EPropertyBagResult | AddValueString
(
const FString& InValue |
||
| EPropertyBagResult | AddValueStruct
(
const T& InValue |
Adds struct value specified type. | |
| EPropertyBagResult | AddValueStruct
(
FConstStructView InValue |
||
| EPropertyBagResult | AddValueText
(
const FText& InValue |
||
| EPropertyBagResult | AddValueUInt32
(
const uint32 InValue |
||
| EPropertyBagResult | AddValueUInt64
(
const uint64 InValue |
||
| TValueOrError< bool, EPropertyBagResult > | Contains
(
const T& Value |
Returns a bool specifying if the element was found or not | |
| int32 | Num () |
Returns number of elements in set. | |
| EPropertyBagResult | Remove
(
const T& Value |
Removes value from set if found. |