Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public void SetJsonToPlay(string json, UniversalPlayer linkedPlayer = null, float timeToSwitch = 0f, bool loop = false)
 {
     SetAnimationToPlay(JsonAnimationConverter.JsonToData(json), linkedPlayer, timeToSwitch, loop);
 }