private void WriteOptions <TEnum>()
     where TEnum : struct
 {
     foreach (TEnum option in _enum.GetValues(typeof(TEnum)))
     {
         WriteOption(option);
     }
 }
示例#2
0
        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;
        }
示例#3
0
        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);
        }