private void WriteOptions <TEnum>() where TEnum : struct { foreach (TEnum option in _enum.GetValues(typeof(TEnum))) { WriteOption(option); } }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { base.GetPropertyHeight(property, label); enumValue = property.GetValue<IEnum>(); enumValues = enumValue.GetValues(); enumNames = enumValue.GetNames().Convert(name => name.Replace('_', '/')); isFlag = enumValue is IEnumFlag; return 16f; }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { base.GetPropertyHeight(property, label); enumValue = property.GetValue <IEnum>(); enumValues = enumValue.GetValues(); enumNames = enumValue.GetNames().Convert(name => name.Replace('_', '/')); isFlag = enumValue is IEnumFlag; return(16f); }