private void ConvertAnimations(AnimationClip[] animationClips)
 {
     foreach (var animationClip in animationClips)
     {
         var iAnim = new ImportedKeyframedAnimation();
         AnimationList.Add(iAnim);
         iAnim.Name       = animationClip.m_Name;
         iAnim.SampleRate = animationClip.m_SampleRate;
         iAnim.Duration   = animationClip.m_MuscleClip.m_StopTime;
         var m_Clip                = animationClip.m_MuscleClip.m_Clip;
         var streamedFrames        = m_Clip.m_StreamedClip.ReadData();
         var m_ClipBindingConstant = animationClip.m_ClipBindingConstant;
         for (int frameIndex = 1; frameIndex < streamedFrames.Count - 1; frameIndex++)
         {
             var frame = streamedFrames[frameIndex];
             for (int curveIndex = 0; curveIndex < frame.keyList.Length; curveIndex++)
             {
                 ReadStreamedData(iAnim, m_ClipBindingConstant, frame.time, frame.keyList[curveIndex]);
             }
         }
         var m_DenseClip = m_Clip.m_DenseClip;
         var streamCount = m_Clip.m_StreamedClip.curveCount;
         for (int frameIndex = 0; frameIndex < m_DenseClip.m_FrameCount; frameIndex++)
         {
             var time        = m_DenseClip.m_BeginTime + frameIndex / m_DenseClip.m_SampleRate;
             var frameOffset = frameIndex * m_DenseClip.m_CurveCount;
             for (int curveIndex = 0; curveIndex < m_DenseClip.m_CurveCount; curveIndex++)
             {
                 var index = streamCount + curveIndex;
                 ReadCurveData(iAnim, m_ClipBindingConstant, (int)index, time, m_DenseClip.m_SampleArray, (int)frameOffset, curveIndex);
             }
         }
         var m_ConstantClip = m_Clip.m_ConstantClip;
         var denseCount     = m_Clip.m_DenseClip.m_CurveCount;
         var time2          = 0.0f;
         for (int i = 0; i < 2; i++)
         {
             for (int curveIndex = 0; curveIndex < m_ConstantClip.data.Length; curveIndex++)
             {
                 var index = streamCount + denseCount + curveIndex;
                 ReadCurveData(iAnim, m_ClipBindingConstant, (int)index, time2, m_ConstantClip.data, 0, curveIndex);
             }
             time2 = animationClip.m_MuscleClip.m_StopTime;
         }
         foreach (var m_Event in animationClip.m_Events)
         {
             iAnim.Events.Add(new ImportedEvent
             {
                 time  = m_Event.time,
                 value = m_Event.data
             });
         }
     }
 }
        private void ReadStreamedData(ImportedKeyframedAnimation iAnim, AnimationClipBindingConstant m_ClipBindingConstant, float time, StreamedClip.StreamedCurveKey curveKey)
        {
            var binding = m_ClipBindingConstant.FindBinding(curveKey.index);

            GetLive2dPath(binding, out var target, out var boneName);
            if (!string.IsNullOrEmpty(boneName))
            {
                var track = iAnim.FindTrack(boneName);
                track.Target = target;
                track.Curve.Add(new ImportedKeyframe <float>(time, curveKey.value, curveKey.inSlope, curveKey.outSlope, curveKey.coeff));
            }
        }
        private void ReadCurveData(ImportedKeyframedAnimation iAnim, AnimationClipBindingConstant m_ClipBindingConstant, int index, float time, float[] data, int offset, int curveIndex)
        {
            var binding = m_ClipBindingConstant.FindBinding(index);

            GetLive2dPath(binding, out var target, out var boneName);
            if (!string.IsNullOrEmpty(boneName))
            {
                var track = iAnim.FindTrack(boneName);
                track.Target = target;
                var value = data[curveIndex];
                track.Curve.Add(new ImportedKeyframe <float>(time, value, 0, 0, null));
            }
        }