static IEnumerator RoutineNest(BlendShapeClipHandler applyer, float velocity, float wait) { for (var value = 0.0f; value <= 1.0f; value += velocity) { if (applyer != null) { applyer.Apply(value); } yield return(null); } if (applyer != null) { applyer.Apply(1.0f); } yield return(new WaitForSeconds(wait)); for (var value = 1.0f; value >= 0; value -= velocity) { if (applyer != null) { applyer.Apply(value); } yield return(null); } if (applyer != null) { applyer.Apply(0); } yield return(new WaitForSeconds(wait * 2)); }
private void Awake() { if (BlendShapes == null) { BlendShapes = GetComponent <VRM.VRMBlendShapeProxy>(); } if (BlendShapes == null) { return; } if (BlendShapes.BlendShapeAvatar == null) { return; } var avatar = BlendShapes.BlendShapeAvatar; m_appyerA = new BlendShapeClipHandler(avatar.GetClip("A"), transform); m_appyerI = new BlendShapeClipHandler(avatar.GetClip("I"), transform); m_appyerU = new BlendShapeClipHandler(avatar.GetClip("U"), transform); m_appyerE = new BlendShapeClipHandler(avatar.GetClip("E"), transform); m_appyerO = new BlendShapeClipHandler(avatar.GetClip("O"), transform); }