mirror of
https://github.com/zoriya/Magical-Garden.git
synced 2026-05-28 15:13:20 +00:00
11 lines
369 B
C#
11 lines
369 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
[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);
|
|
}
|
|
} |