public override void Save(object instance, FieldInfo field, string prefix) { IList list = field.GetValue(instance) as IList; prefix += instance.GetType().FullName + '.' + field.Name; NGEditorPrefs.SetInt(prefix, list.Count); prefix += '.'; for (int i = 0; i < list.Count; i++) { NGEditorPrefs.SetString(prefix + i, Convert.ToBase64String(Utility.SerializeField(list[i]))); } }
public override void Save(object instance, FieldInfo field, string prefix) { NGEditorPrefs.SetString(prefix + instance.GetType().FullName + '.' + field.Name, (String)field.GetValue(instance)); }