
UBTween.Scale interpolates the scale of an object.
Supported Objects:
| Target | Value changed |
|---|---|
Transform | Transform.localScale |
RectTransform | RectTransform.localScale |
Use Current Scale As Start :
UBTween.Scale(
transform, // Target Object
Vector3.zero, // End Scale
1f); // Duration
Using float will set all the axis to that number :
UBTween.Scale(
transform, // Target Object
0f, // End Scale
1f); // Duration

Specify Start Scale :
UBTween.Scale(
transform, // Target Object
Vector3.zero, // Start Scale
Vector3.one * 2, // End Scale
1f); // Duration
Using float will set all the axis to that number :
UBTween.Scale(
transform, // Target Object
0f, // Start Scale
2f, // End Scale
1f); // Duration

Gif Code :
UBTween.Sequence sequence = new UBTween.Sequence()
{
UBTween.Scale(transform, scale, 1)
.SetEase(EaseType.OutExpo),
UBTween.Scale(transform, scale, Vector3.one, 1)
.SetEase(EaseType.OutElastic)
.SetDelay(1f)
}.SetLoop().Start();