/// <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");
}
}