private void SetupReferencedClip(string otherModelImporterPath)
{
SerializedObject targetImporter = GetModelImporterSerializedObject(otherModelImporterPath);
// We may receive a path that doesn't have a importer.
if (targetImporter != null)
{
targetImporter.CopyFromSerializedProperty(serializedObject.FindProperty("m_AnimationType"));
SerializedProperty copyAvatar = targetImporter.FindProperty("m_CopyAvatar");
if (copyAvatar != null)
{
copyAvatar.boolValue = true;
}
SerializedProperty avatar = targetImporter.FindProperty("m_LastHumanDescriptionAvatarSource");
if (avatar != null)
{
avatar.objectReferenceValue = m_Avatar;
}
CopyHumanDescriptionToDestination(serializedObject, targetImporter);
targetImporter.ApplyModifiedProperties();
targetImporter.Dispose();
}
}