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

How to play Animations while Time.timeScale= 0;

Discussion in 'Editor & General Support' started by djgriff, Sep 1, 2015.

Thread Status:
Not open for further replies.
  1. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    279
    Hi I have implemented a pause menu and in doing so i set the timeScale to 0. but this wont allow animation(DoTween) to operate.

    Is there away around this?

    Thanks

    Daniel
     
    edamtem, mikeohc, GlitchyPSI and 2 others like this.
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    When you make a tween with DOTween, it creates a "Tweener" object that you can modify. The Tweener has a SetUpdate() function with a few overloads... if you just call SetUpdate(true), it will update using unscaled time.

    Example:
    myVariable.DoLocalMove(......).SetUpdate(true);



    Also, if you're working with animators, you can change their update mode in the inspector to "Unscaled Time"
     
  3. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    279
    cool thanks for the reply
     
    kintovt likes this.
  4. AhmenX

    AhmenX

    Joined:
    Mar 22, 2016
    Posts:
    7
    Still relevant! Helped me just today.
     
    sonofbryce likes this.
  5. Sebjschindler

    Sebjschindler

    Joined:
    Jan 5, 2016
    Posts:
    2
    Seconding the same thing AhmenX stated in February: this worked wonders for me!
     
  6. BUTTyPOO

    BUTTyPOO

    Joined:
    Apr 11, 2016
    Posts:
    6
    Thanks!
     
  7. Zeeshan-anwar

    Zeeshan-anwar

    Joined:
    May 22, 2021
    Posts:
    1
    yes your answer is right helped me just today...
    can you suggest any good vedio tutorials that can help me in learning Dotween?
     
  8. NatsuD_123

    NatsuD_123

    Joined:
    Feb 19, 2019
    Posts:
    18
    Thanks.helped
     
  9. Lefko

    Lefko

    Joined:
    Jan 5, 2020
    Posts:
    18
    Nice clear answer. Thanks!
     
  10. p_lewis

    p_lewis

    Joined:
    Nov 28, 2019
    Posts:
    3
    Hell of an answer!
     
  11. batuhankym

    batuhankym

    Joined:
    Apr 25, 2021
    Posts:
    1
    thanks for the answer
     
Thread Status:
Not open for further replies.