/// <summary>
        /// Refresh animation.
        /// </summary>
        /// <param name="data">Animation data, type is PathAnimationData.</param>
        public override void Refresh(object data)
        {
            var newData = data as PathAnimationData;

            if (newData == null)
            {
                LogUtility.LogError("[CurvePathAnimation] Refresh error: the type of data is not PathAnimationData.");
            }
            else
            {
                path      = newData.path;
                keepUp    = newData.keepUp;
                reference = newData.reference;
                Rewind(0);
            }
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="path">Path of animation.</param>
 /// <param name="keepUp">Keep up mode on play animation.</param>
 /// <param name="reference">Keep up reference transform.</param>
 public PathAnimationData(MonoCurvePath path, KeepUpMode keepUp = KeepUpMode.WorldUp, Transform reference = null)
 {
     this.path      = path;
     this.keepUp    = keepUp;
     this.reference = reference;
 }