You’re looking for what is often called a ‘tween’ engine.
There are many tween engines out there.
Mine is called SPTween and is found in my Spacepuppy Framework:
example usage is like:
SPTween.PlayFromTo(transform, "position.y", EaseMethods.BounceEaseOut, start, end, dur);
or for more complex situations, I have a functional approach. Here I tween several different things (mostly opaqueness of some sprites, and some text in a text field):
SPTween.Tween(_bg)
.SetId(this.GetInstanceID())
.RedirectTo("color.a", EaseMethods.LinearEaseIn, 0f, 1f, this.TransitionFadeDur)
.AutoKill()
.Play();
_image.enabled = true;
_image.sprite = Sprite.Create(data.Image, new Rect(0f, 0f, data.Image.width, data.Image.height), Vector2.zero);
SPTween.Tween(_image)
.SetId(this.GetInstanceID())
.RedirectTo("color.a", EaseMethods.LinearEaseIn, 0f, 1f, this.TransitionFadeDur)
.AutoKill()
.Play();
_text.enabled = true;
_messageTextTween = SPTween.Tween(_text)
.SetId(this.GetInstanceID())
.RedirectTo("color.a", EaseMethods.LinearEaseIn, 0f, 1f, this.TransitionFadeDur)
.AutoKill("color.a")
.OnFinish((s, e) => _messageTextTween = null)
.Play();
textTweenDur = com.spacepuppy.Tween.Curves.StringCurve.CalculateDuration(string.Empty, data.Message, data.Speed);
SPTween.Tween(_text)
.SetId(this.GetInstanceID())
.FromTo("text", EaseMethods.LinearEaseIn, string.Empty, data.Message, textTweenDur, StringTweenStyle.Default)
.AutoKill()
.Play();
Others include iTween:
http://itween.pixelplacement.com/index.php
HOTween:
DOTween:
And there are more.