示例#1
0
 public static ComponentProperty FindProperty(ComponentDescription description, string key, PropertySearchKey keyType)
 {
     foreach (ComponentProperty property in description.Properties)
     {
         if (keyType == PropertySearchKey.FullName && property.Name == key)
             return property;
         else if (keyType == PropertySearchKey.SerializedName && property.SerializedName == key)
             return property;
     }
     return null;
 }
 public static ComponentProperty FindProperty(ComponentDescription description, string key, PropertySearchKey keyType)
 {
     foreach (ComponentProperty property in description.Properties)
     {
         if (keyType == PropertySearchKey.FullName && property.Name == key)
         {
             return(property);
         }
         else if (keyType == PropertySearchKey.SerializedName && property.SerializedName == key)
         {
             return(property);
         }
     }
     return(null);
 }