FlagsEditor.cs 374 B

12345678910111213
  1. using UnityEditor;
  2. using UnityEngine;
  3. namespace ZenFulcrum.EmbeddedBrowser {
  4. [CustomPropertyDrawer(typeof(FlagsFieldAttribute))]
  5. public class FlagsEditor : PropertyDrawer {
  6. public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
  7. property.intValue = EditorGUI.MaskField(position, label, property.intValue, property.enumNames);
  8. }
  9. }
  10. }