public ConfigureClipFromMask ( |
||
mask | AvatarMask from which the mask settings will be imported. | |
Résultat | 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"); } }
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"); } }