public LipSync lipSyncCharacter;or using GetComponent.
gameObject.GetComponent<LipSync>();Then call the
.Play(LipSyncData clip, float delay)method on it, passing a reference to a LipSyncData clip to play, and (optionally) a delay in seconds before the clip will start playing.
.SetEmotion(string emotionName, float blendTime)method on any LipSync component passing in the name of any emotion defined in the Project Settings. The character will then blend from its current emotion (or neutral) into the chosen emotion over the course of the blendTime value passed in.
.ResetEmotion(float blendTime)to blend back into the character's neutral face.
onFinishedPlayingwhich is called whenever a clip ends, either naturally or by
.Stop(bool stopAudio)being called. This can have listeners added from the editor, or from code. See Unity's documentation for more info on this.
.loopfield is a boolean that determines whether any played clips will loop back to the start when they finish. If this is true,
onFinishedPlayingwill still fire at the end of each loop, but the clip will never stop of its own accord.
.Stop(bool stopAudio)must be called manually, or
.loopset back to false.
.keepEmotionWhenFinishedboolean controls what happens to emotions at the end of a clip. If a clip ends with an emotion that hasn't blended out and this value is false, then the emotion will transition back to neutral anyway after the clip finishes. If this value is true, however, the emotion will stay active on the character, and can then be reset later with the