mirror of
https://github.com/zoriya/Magical-Garden.git
synced 2026-06-13 04:40:30 +00:00
16 lines
462 B
C#
16 lines
462 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public class EnumFlagsAttribute : PropertyAttribute
|
|
{
|
|
public EnumFlagsAttribute() { }
|
|
}
|
|
|
|
[CustomPropertyDrawer(typeof(EnumFlagsAttribute))]
|
|
public class EnumFlagsAttributeDrawer : PropertyDrawer
|
|
{
|
|
public override void OnGUI(Rect _position, SerializedProperty _property, GUIContent _label)
|
|
{
|
|
_property.intValue = EditorGUI.MaskField(_position, _label, _property.intValue, _property.enumNames);
|
|
}
|
|
} |