Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/FPCGMetadataDomain
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/PCGMetadataDomain.h |
| Include Path | #include "Metadata/PCGMetadataDomain.h" |
template<typename T>
FPCGMetadataAttribute < T > * FindOrCreateAttribute
(
FName AttributeName,
const T & DefaultValue,
bool bAllowsInterpolation,
bool bOverrideParent,
bool bOverwriteIfTypeMismatch
)