FAttributesSetBase::RegisterAttributeInternal

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

Choose your operating system:

Windows

macOS

Linux

References

Module

MeshDescription

Header

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

Include

#include "MeshAttributeArray.h"

Syntax

template<typename T>
TMeshAttributesArray< typename TMeshAttributesRegisterType< T >::RefType > RegisterAttributeInternal
(
    const FName AttributeName,
    const int32 NumberOfChannels,
    const typename TMeshAttributesRegisterType< T >::RealAttributeType & 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 channels and flags.

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

       . . .

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