Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[LeanTween] How do I set the phase of a looping animation?

Discussion in 'Assets and Asset Store' started by Ziplock9000, Dec 13, 2020.

  1. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    For example:

    Code (CSharp):
    1. LeanTween.moveY(gameObject.GetComponent<RectTransform>(), 2, 1f).setLoopPingPong().setEase(LeanTweenType.easeInOutSine).setPhase(UnityEngine.Random.value);
     
  2. astechnolabs

    astechnolabs

    Joined:
    Jul 11, 2021
    Posts:
    20
    You can remove
    .setEase


    Try This

    Code (CSharp):
    1. LeanTween.moveY(gameObject.GetComponent<RectTransform>(), 2, 1f).setLoopPingPong();