Describe the bug
It is impossible to use constants as the default value for UxmlAttribute.
The following code generates: error UXMLG003: UxmlAttribute for 'MaxTextLength' property was not created. The default property and attribute value must be of the same type.
private const int DefaultMaxLength = -1;
[UxmlAttribute(DefaultMaxLength)]
private int MaxTextLength { get; set; }
Describe the bug
It is impossible to use constants as the default value for
UxmlAttribute.The following code generates:
error UXMLG003: UxmlAttribute for 'MaxTextLength' property was not created. The default property and attribute value must be of the same type.