Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/UPCGMetadata
Description
Find or create an attribute. Follows CreateAttribute signature. Extra boolean bOverwriteIfTypeMismatch allows to overwrite an existing attribute if the type mismatch. Same as CreateAttribute, it will return nullptr if the attribute name is invalid. Return a typed attribute pointer, of the requested type T.
| Name | FindOrCreateAttribute |
| Type | function |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Metadata/PCGMetadata.h |
| Include Path | #include "Metadata/PCGMetadata.h" |
template<typename T>
FPCGMetadataAttribute < T > * FindOrCreateAttribute
(
FPCGAttributeIdentifier AttributeName,
const T & DefaultValue,
bool bAllowsInterpolation,
bool bOverrideParent,
bool bOverwriteIfTypeMismatch
)