Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/UPCGBlueprintHelpers
Description
Extract a given property from a structure into an Attribute Set. If the Property is None, will extract the full structure. Only works with a structure as input.
| Name | ExtractStructureAsAttributeSet |
| Type | function |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Helpers/PCGBlueprintHelpers.h |
| Include Path | #include "Helpers/PCGBlueprintHelpers.h" |
UFUNCTION (BlueprintCallable, CustomThunk, Category="PCG|Data",
Meta=(CustomStructureParam="Struct", AllowAbstract="false"))
static UPCGParamData * ExtractStructureAsAttributeSet
(
UPARAM(DisplayName="Structure To Convert") const int32 & Struct,
const FName PropertyPath,
const FName OutputAttributeName,
const bool bExtract,
const bool bStrictlySanitizeNames
)
Extracted param data. Can be null if something went wrong.
Parameters
| Name | Remarks |
|---|---|
| Struct | Structure to extract |
| PropertyPath | Path to the property in the structure to extract. Must be a valid property. If None, will extract the structure as input. |
| OutputAttributeName | If the property to extract is not a struct/object, can provide an override to the output attribute name. Use @Source to use the PropertyName. |
| bExtract | If the property path is not None and reference an object/struct, give the possibility to extract all its members in one go. |
| bStrictlySanitizeNames | Output attribute name are already sanitized by default but it keeps some characters like spaces. This is a stricter option and if the name is not following the object name rule (pretty much only alphanumerical and "_"), it will be sanitized. Necessary if we have cases with spaces, which doesn't play nicely with PCG attributes. |