public void SetAnimationToPlay(FaceData currentData, UniversalPlayer linkedPlayer = null, float timeToSwitch = 0f, bool loop = false) { IsPlaying = true; this.player = linkedPlayer; this.currentData = currentData; this.isLoop = loop; if (jsonToUnityBlendMap == null) { PrepareBlendshapesMapping(); } if (jsonToUnityBoneMap == null) { PrepareBonesMapping(); } StopAllCoroutines(); StartCoroutine(PlayingRoutine(timeToSwitch)); }
public void SetJsonToPlay(string json, UniversalPlayer linkedPlayer = null, float timeToSwitch = 0f, bool loop = false) { SetAnimationToPlay(JsonAnimationConverter.JsonToData(json), linkedPlayer, timeToSwitch, loop); }