ConfigureClipFromMask() public method

Copy the mask settings from an AvatarMask to the clip configuration.

public ConfigureClipFromMask ( AvatarMask mask ) : void
mask UnityEditor.Animations.AvatarMask AvatarMask from which the mask settings will be imported.
return void
 /// <summary>
 /// <para>Creates a mask that matches the model hierarchy, and applies it to the provided ModelImporterClipAnimation.</para>
 /// </summary>
 /// <param name="clip">Clip to which the mask will be applied.</param>
 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");
     }
 }
示例#2
0
 public void CreateDefaultMaskForClip(ModelImporterClipAnimation clip)
 {
     if (this.defaultClipAnimations.Length > 0)
     {
         AvatarMask avatarMask = new AvatarMask();
         this.defaultClipAnimations[0].ConfigureMaskFromClip(ref avatarMask);
         clip.ConfigureClipFromMask(avatarMask);
         UnityEngine.Object.DestroyImmediate(avatarMask);
     }
     else
     {
         Debug.LogError("Cannot create default mask because the current importer doesn't have any animation information");
     }
 }