add general facial animations support

This commit is contained in:
CroakFang
2023-01-15 21:17:43 +08:00
parent 6618795498
commit ed6b068380
+7
View File
@@ -1217,6 +1217,13 @@ public class UmaViewerBuilder : MonoBehaviour
CurrentUMAContainer.SetHeight(-1);
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.SetTrigger("next");
}