NewN_UAVPlane/Assets/3rdParty/ZFBrowser/Scripts/Editor/FlagsEditor.cs

14 lines
374 B
C#

using UnityEditor;
using UnityEngine;
namespace ZenFulcrum.EmbeddedBrowser {
[CustomPropertyDrawer(typeof(FlagsFieldAttribute))]
public class FlagsEditor : PropertyDrawer {
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
property.intValue = EditorGUI.MaskField(position, label, property.intValue, property.enumNames);
}
}
}