IVertexCustom.SetCustomAttribute

IVertexCustom.SetCustomAttribute method

Sets a custom attribute only if attributeName is defined in the vertex.

⚠️ USE ONLY ON UNBOXED VALUES ⚠️

public void SetCustomAttribute(string attributeName, object value)
ParameterTypeDescription
attributeNameStringThe attribute name.
valueObjectThe attribute value.

Remarks

If attributeName is not defined in the custom vertex, the method must not do any action.

Examples

public void SetCustomAttribute(string attributeName, object value)
{
    if (attributeName == "CustomFloat" && value is float f) this.CustomValue = f;
}

See Also