private void CopyAvatarGUI()
{
GUILayout.Label("If you have already created an Avatar for another model with a rig identical to this one, you can copy its Avatar definition.\nWith this option, this model will not create any avatar but only import animations.", EditorStyles.helpBox, new GUILayoutOption[0]);
EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(this.m_AvatarSource, GUIContent.Temp("Source"), new GUILayoutOption[0]);
Avatar objectReferenceValue = this.m_AvatarSource.objectReferenceValue as Avatar;
if (EditorGUI.EndChangeCheck())
{
this.CheckAvatar(objectReferenceValue);
AvatarSetupTool.ClearAll(base.serializedObject);
if (objectReferenceValue != null)
{
this.CopyHumanDescriptionFromOtherModel(objectReferenceValue);
}
this.m_AvatarCopyIsUpToDate = true;
}
if (((objectReferenceValue != null) && !this.m_AvatarSource.hasMultipleDifferentValues) && (!this.m_AvatarCopyIsUpToDate && GUILayout.Button(styles.UpdateMuscleDefinitionFromSource, EditorStyles.miniButton, new GUILayoutOption[0])))
{
AvatarSetupTool.ClearAll(base.serializedObject);
this.CopyHumanDescriptionFromOtherModel(objectReferenceValue);
this.m_AvatarCopyIsUpToDate = true;
}
EditorGUILayout.EndHorizontal();
}