public static void CopyPropertyValue(SerializedProperty destProperty, SerializedProperty sourceProperty)
{
if (destProperty == null)
throw new ArgumentNullException("destProperty");
if (sourceProperty == null)
throw new ArgumentNullException("sourceProperty");
sourceProperty = sourceProperty.Copy();
destProperty = destProperty.Copy();
CopyPropertyValueSingular(destProperty, sourceProperty);
if (sourceProperty.hasChildren) {
int elementPropertyDepth = sourceProperty.depth;
while (sourceProperty.Next(true) && destProperty.Next(true) && sourceProperty.depth > elementPropertyDepth)
CopyPropertyValueSingular(destProperty, sourceProperty);
}
}