public void SetValue(IList array, int index) { if (array == null) { return; } if (array.Count > index) { var target = array[index]; if (target == null) { if (isUnityObject) { return; } else { target = array[index] = TypePoolManager.Create(source.GetType()); } } copier.CopyTo(source, target); } }
public void SetValue(object instance) { if (instance == null) { return; } var target = field.GetValue(instance); if (target == null) { if (isUnityObject) { return; } else { field.SetValue(instance, target = TypePoolManager.Create(source.GetType())); } } copier.CopyTo(source, target); }
public void InitializeFields(object instance) { copier.CopyTo(source, instance); }