UnityEditor.ModelImporter.CreateDefaultMaskForClip C# (CSharp) Méthode

CreateDefaultMaskForClip() public méthode

Creates a mask that matches the model hierarchy, and applies it to the provided ModelImporterClipAnimation.

public CreateDefaultMaskForClip ( ModelImporterClipAnimation clip ) : void
clip ModelImporterClipAnimation Clip to which the mask will be applied.
Résultat void
        public void CreateDefaultMaskForClip(ModelImporterClipAnimation clip)
        {
            if (this.defaultClipAnimations.Length > 0)
            {
                AvatarMask mask = new AvatarMask();
                this.defaultClipAnimations[0].ConfigureMaskFromClip(ref mask);
                clip.ConfigureClipFromMask(mask);
                Object.DestroyImmediate(mask);
            }
            else
            {
                Debug.LogError("Cannot create default mask because the current importer doesn't have any animation information");
            }
        }