public static void CopyValuesFrom(this Object thisObject, SerializedObject otherObject, HashSet <string> excludeValues = null) { var thisSerializedObject = new SerializedObject(thisObject); thisSerializedObject.CopyValuesFrom(otherObject, excludeValues); }