FAttributesSetBase::RegisterAttribute

Register a new attribute name with the given type (must be a member of the AttributeTypes tuple).

Windows
MacOS
Linux

References

Module

MeshDescription

Header

/Engine/Source/Runtime/MeshDescription/Public/MeshAttributeArray.h

Include

#include "MeshAttributeArray.h"

Syntax

template<typename AttributeType>
void RegisterAttribute
(
    const FName AttributeName,
    const int32 NumberOfIndices,
    const AttributeType & Default,
    const EMeshAttributeFlags Flags
)

Remarks

Register a new attribute name with the given type (must be a member of the AttributeTypes tuple). If the attribute name is already registered, it will update it to use the new type, number of indices and flags.

Example of use: VertexInstanceAttributes().RegisterAttribute( "UV", 8 );

       . . .

TVertexInstanceAttributeArray& UV0 = VertexInstanceAttributes().GetAttributes( "UV", 0 ); UV0[ VertexInstanceID ] = FVector2D( 1.0f, 1.0f );

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss