UnityEditor.ModelImporterRigEditor.CheckAvatar C# (CSharp) Method

CheckAvatar() private method

private CheckAvatar ( Avatar sourceAvatar ) : void
sourceAvatar UnityEngine.Avatar
return void
        private void CheckAvatar(Avatar sourceAvatar)
        {
            if (sourceAvatar != null)
            {
                if (sourceAvatar.isHuman && (this.animationType != ModelImporterAnimationType.Human))
                {
                    if (EditorUtility.DisplayDialog("Asigning an Humanoid Avatar on a Generic Rig", "Do you want to change Animation Type to Humanoid ?", "Yes", "No"))
                    {
                        this.animationType = ModelImporterAnimationType.Human;
                    }
                    else
                    {
                        this.m_AvatarSource.objectReferenceValue = null;
                    }
                }
                else if (!sourceAvatar.isHuman && (this.animationType != ModelImporterAnimationType.Generic))
                {
                    if (EditorUtility.DisplayDialog("Asigning an Generic Avatar on a Humanoid Rig", "Do you want to change Animation Type to Generic ?", "Yes", "No"))
                    {
                        this.animationType = ModelImporterAnimationType.Generic;
                    }
                    else
                    {
                        this.m_AvatarSource.objectReferenceValue = null;
                    }
                }
            }
        }