示例#1
0
 private static T GetPropertyAttribute <T>(SerializedProperty property) where T : Attribute
 {
     T[] propertyAttributes = ReorderableArrayEditor.GetPropertyAttributes <T>(property);
     if (propertyAttributes != null && propertyAttributes.Length > 0)
     {
         return(propertyAttributes[0]);
     }
     return((T)((object)null));
 }
示例#2
0
 public static bool HasReorderableAttribute(SerializedProperty property)
 {
     PropertyAttribute[] propertyAttributes = ReorderableArrayEditor.GetPropertyAttributes <PropertyAttribute>(property);
     if (propertyAttributes != null)
     {
         PropertyAttribute[] array = propertyAttributes;
         for (int i = 0; i < array.Length; i++)
         {
             PropertyAttribute propertyAttribute = array[i];
             if (propertyAttribute.GetType().Name == "ReorderableAttribute")
             {
                 return(true);
             }
         }
     }
     return(false);
 }