public static T EnumFlagsField <T>(GUIContent label, T value, params GUILayoutOption[] options) where T : struct { EnsureEnumType <T>(); #if UNITY_2017_3_OR_NEWER return(EnumCast.FromEnum <T>(EditorGUILayout.EnumFlagsField(label, EnumCast.ToEnum(value), options))); #else return(EnumCast.FromEnum <T>(EditorGUILayout.EnumMaskField(label, EnumCast.ToEnum(value), options))); #endif }
public static T EnumPopup <T>(GUIContent label, T value, params GUILayoutOption[] options) where T : struct { EnsureEnumType <T>(); return(EnumCast.FromEnum <T>(EditorGUILayout.EnumPopup(label, EnumCast.ToEnum(value), options))); }