Shake

UBTween.Shake shakes the position of an object.

Supported Objects:

Target Value changed
Transform Transform.position
RectTransform RectTransform.position

Use Current Position As Center :

UBTween.ShakePosition(
    transform,      // Target Object
    new(1, 0),      // Distance At Start And End
    1,              // Duration
    Ref.Global,     // (Optional) Referential
    true);          // (Optional) Does It Snaps Back At The End ?

Shake_0

Specify Origin :

UBTween.ShakePosition(
    transform,      // Target Object
    Vector3.zero,   // Shake Origin
    new(1, 0),      // Distance At Start And End
    1,              // Duration
    Ref.Global,     // (Optional) Referential
    true);          // (Optional) Does It Snaps Back At The End ?

Shake_1

Shake On Plane

UBTween.ShakePosition(
    transform,      // Target Object
    new(5, 0),      // Distance At Start And End
    Vector3.forward,// Normal
    1,              // Duration
    Ref.Global,     // (Optional) Referential
    true);          // (Optional) Does It Snaps Back At The End ?

Shake_2

Gif Code :

Sequence sequence = new Sequence()
{
    UBTween.ShakePosition(transform, new(0, 1), Vector3.up, 1).SetEase(EaseType.OutExpo),
    UBTween.ShakePosition(transform, new(1, 0), Vector3.up, 1).SetEase(EaseType.OutExpo).SetDelay(1),
}.Start().SetLoop(); 

This site uses Just the Docs, a documentation theme for Jekyll.