Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/UPCGMetadataAccessorHelpers
Description
Set an arbitrary value to an attribute, using a given metadata entry key. The value needs to be the same type of the attribute or able to convert to it.
| Name | SetAttributeValueByMetadataKey |
| Type | function |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Metadata/PCGMetadataAccessor.h |
| Include Path | #include "Metadata/PCGMetadataAccessor.h" |
UFUNCTION (BlueprintCallable, CustomThunk, Category="PCG|Metadata",
Meta=(ScriptMethod, CustomStructureParam="Value", AllowAbstract="false"))
static bool SetAttributeValueByMetadataKey
(
UPCGMetadata * Metadata,
int64 & Key,
FName AttributeName,
const int32 & Value
)
true if the set succeeded, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| Key | Metadata entry key to set. The key can be modified. |
| Metadata | Pointer to a mutable metadata |
| AttributeName | Name of the attribute to set the value on |
| Value | Wildcard pin to hold the value to set. |