add general facial animations support
This commit is contained in:
@@ -1217,6 +1217,13 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
CurrentUMAContainer.SetHeight(-1);
|
CurrentUMAContainer.SetHeight(-1);
|
||||||
SetPreviewCamera(null);
|
SetPreviewCamera(null);
|
||||||
|
|
||||||
|
//Some animations have facial animation
|
||||||
|
var facialMotion = Main.AbMotions.FirstOrDefault(a => a.Name.EndsWith(clip.name + "_face"));
|
||||||
|
if (facialMotion != null)
|
||||||
|
{
|
||||||
|
RecursiveLoadAsset(facialMotion);
|
||||||
|
}
|
||||||
|
|
||||||
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
||||||
CurrentUMAContainer.UmaAnimator.SetTrigger("next");
|
CurrentUMAContainer.UmaAnimator.SetTrigger("next");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user