public Dictionary<string, WMG_PropertyField> GetProperties(object obj) { Dictionary<string, WMG_PropertyField> fields = new Dictionary<string, WMG_PropertyField>(); PropertyInfo[] infos = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo info in infos) { if (!(info.CanRead && info.CanWrite)) continue; var type = SerializedPropertyType.Integer; if (WMG_PropertyField.GetPropertyType(info, out type)) { var field = new WMG_PropertyField(obj, info, type); fields.Add(info.Name, field); } } return fields; }