/// <summary>
        /// See Unity documentation.
        /// </summary>
        /// <param name="position">See Unity documentation.</param>
        /// <param name="property">See Unity documentation.</param>
        /// <param name="label">See Unity documentation.</param>
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            var attr = attribute as EnumFlagsAttribute;

            label      = EditorGUI.BeginProperty(position, label, property);
            label.text = label.text;
            if (attr.displayValue)
            {
                label.text += " (" + property.intValue + ")";
            }

            EditorGUI.BeginChangeCheck();

            int val =
                EditorGUIUtil.DrawEnumFlagsField(position, property.intValue, attr.enumType, label, attr.sort);

            if (EditorGUI.EndChangeCheck())
            {
                property.intValue = val;
            }
        }