UnityEditor.ModelImporterRigEditor.ConfigureAvatarGUI C# (CSharp) Method

ConfigureAvatarGUI() private method

private ConfigureAvatarGUI ( ) : void
return void
        private void ConfigureAvatarGUI()
        {
            if (base.targets.Length > 1)
            {
                GUILayout.Label("Can't configure avatar in multi-editing mode", EditorStyles.helpBox, new GUILayoutOption[0]);
            }
            else if (this.singleImporter.transformPaths.Length <= HumanTrait.RequiredBoneCount)
            {
                GUILayout.Label("Not enough bones to create human avatar (requires " + HumanTrait.RequiredBoneCount + ")", EditorStyles.helpBox, new GUILayoutOption[0]);
            }
            else
            {
                GUIContent avatarValid;
                if ((this.m_Avatar != null) && !this.HasModified())
                {
                    if (this.m_Avatar.isHuman)
                    {
                        avatarValid = styles.avatarValid;
                    }
                    else
                    {
                        avatarValid = styles.avatarInvalid;
                    }
                }
                else
                {
                    avatarValid = styles.avatarPending;
                    GUILayout.Label("The avatar can be configured after settings have been applied.", EditorStyles.helpBox, new GUILayoutOption[0]);
                }
                Rect controlRect = EditorGUILayout.GetControlRect(new GUILayoutOption[0]);
                GUI.Label(new Rect((controlRect.xMax - 75f) - 18f, controlRect.y, 18f, controlRect.height), avatarValid, EditorStyles.label);
                EditorGUI.BeginDisabledGroup(this.m_Avatar == null);
                if (GUI.Button(new Rect(controlRect.xMax - 75f, controlRect.y + 1f, 75f, controlRect.height - 1f), styles.configureAvatar, EditorStyles.miniButton))
                {
                    if (!this.isLocked)
                    {
                        if (EditorApplication.SaveCurrentSceneIfUserWantsTo())
                        {
                            Selection.activeObject = this.m_Avatar;
                            AvatarEditor.s_EditImmediatelyOnNextOpen = true;
                        }
                        GUIUtility.ExitGUI();
                    }
                    else
                    {
                        Debug.Log("Cannot configure avatar, inspector is locked");
                    }
                }
                EditorGUI.EndDisabledGroup();
            }
        }