UnityEditor.AvatarPreview.GetGenericAnimationFallback C# (CSharp) Méthode

GetGenericAnimationFallback() private static méthode

private static GetGenericAnimationFallback ( ) : GameObject
Résultat UnityEngine.GameObject
        private static GameObject GetGenericAnimationFallback()
        {
            return (GameObject) EditorGUIUtility.Load("Avatar/DefaultGeneric.fbx");
        }

Usage Example

Exemple #1
0
        private static GameObject CalculatePreviewGameObject(Animator selectedAnimator, Motion motion, ModelImporterAnimationType animationType)
        {
            AnimationClip firstAnimationClipFromMotion = AvatarPreview.GetFirstAnimationClipFromMotion(motion);
            GameObject    gameObject = AvatarPreviewSelection.GetPreview(animationType);

            if (AvatarPreview.IsValidPreviewGameObject(gameObject, ModelImporterAnimationType.None))
            {
                return(gameObject);
            }
            if (selectedAnimator != null && AvatarPreview.IsValidPreviewGameObject(selectedAnimator.gameObject, animationType))
            {
                return(selectedAnimator.gameObject);
            }
            gameObject = AvatarPreview.FindBestFittingRenderableGameObjectFromModelAsset(firstAnimationClipFromMotion, animationType);
            if (gameObject != null)
            {
                return(gameObject);
            }
            if (animationType == ModelImporterAnimationType.Human)
            {
                return(AvatarPreview.GetHumanoidFallback());
            }
            if (animationType == ModelImporterAnimationType.Generic)
            {
                return(AvatarPreview.GetGenericAnimationFallback());
            }
            return(null);
        }
All Usage Examples Of UnityEditor.AvatarPreview::GetGenericAnimationFallback