public MotionMatchingData(
            AnimationClip[] clips,
            Vector3[] animationSeqInfos,
            float frameRate,
            string name,
            bool seemless,
            float length,
            bool findInYourself,
            bool blendToYourself,
            AnimationDataType type
            )
        {
            this.clips             = new List <AnimationClip>(clips);
            this.name              = name + "_MM";
            this.frameRate         = frameRate;
            this.isLooping         = seemless;
            this.animationLength   = length;
            this.frameTime         = 1f / this.frameRate;
            this.blendToYourself   = blendToYourself;
            this.findInYourself    = findInYourself;
            this.animationSeqInfos = animationSeqInfos;
            this.dataType          = type;

            sections = new List <MM_DataSection>();
            sections.Add(new MM_DataSection("Always"));
            sections[0].timeIntervals.Add(new float2(0f, this.animationLength));
            neverChecking        = new MM_DataSection("Never checking");
            notLookingForNewPose = new MM_DataSection("Not looking for new pose");
        }
        public void UpdateFromOther(MotionMatchingData newData, string newName)
        {
            this.name            = newName;
            this.clips           = newData.clips;
            this.frameRate       = newData.frameRate;
            this.frameTime       = newData.frameTime;
            this.animationLength = newData.animationLength;
            this.isLooping       = newData.isLooping;
            this.dataType        = newData.dataType;
            //this.endLocalPosition = newData.endLocalPosition;
            //this.deltaRotStartEnd = newData.deltaRotStartEnd;
            //this.startLocalPosition = newData.startLocalPosition;
            //this.deltaRotEndStart = newData.deltaRotEndStart;
            //this.curves = newData.curves;
            this.frames           = newData.frames;
            this.usedFrameCount   = newData.numberOfFrames;
            this.blendTreeWeights = newData.blendTreeWeights;
            this.sections         = newData.sections;
            this.blendToYourself  = newData.blendToYourself;
            findInYourself        = newData.findInYourself;

            this.animationSeqInfos = newData.animationSeqInfos;

            this.neverChecking         = newData.neverChecking;
            this.trajectoryPointsTimes = newData.trajectoryPointsTimes;

            FrameData bufforFrame;

            for (int frameIndex = 0; frameIndex < frames.Count; frameIndex++)
            {
                bufforFrame = frames[frameIndex];
                for (int sectionIndex = 0; sectionIndex < sections.Count; sectionIndex++)
                {
                    for (int intervalIndex = 0; intervalIndex < sections[sectionIndex].timeIntervals.Count; intervalIndex++)
                    {
                        if (bufforFrame.localTime >= sections[sectionIndex].timeIntervals[intervalIndex].x &&
                            bufforFrame.localTime <= sections[sectionIndex].timeIntervals[intervalIndex].y)
                        {
                            bufforFrame.sections.SetSection(sectionIndex, true);
                        }
                        else
                        {
                            bufforFrame.sections.SetSection(sectionIndex, false);
                        }
                    }
                }
                frames[frameIndex] = bufforFrame;
            }

            //for (int i = 0; i < newCreatedAsset.frames.Count; i++)
            //{
            //    loadedAsset.frames.Add(newCreatedAsset.frames[i]);
            //}
        }