Search Unity

Invalid time range for Transition exit time condition

Discussion in 'Animation' started by IElectric, Aug 2, 2020.

  1. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, I know that is an old question but I don't understand when it's happen, I manage the Time.timeScale from 0 to 1 in my videogame and I use "ForceStateNormalizedTime" method on some animation components in the script code.

    There is a best practice to catch and manage this error ? It's a critical exception or can I leave as it is during the game ? Thank you very much, Cheers...

    I'm using
    Unity 2019.4.1f1
    Visual Studio 2017
    Win32 .net 4 mono
     
    Last edited: Dec 1, 2020
    Whatever560 likes this.
  2. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    513
    This error is not really easy to trace, so I'm with you on how could it be done to resolve this.
     
    IElectric likes this.
  3. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    513
    Anyone? This is making tests fail. And no, we don't want to mute errors in tests
     
  4. icuruok

    icuruok

    Joined:
    Jun 16, 2019
    Posts:
    2
    This is caused by the animation controller in the scene, On one of the transitions " the arrows within the controller". Click one of these and check its "Has Exit Time" checkbox. Then adjust the Transition Duration and or Exit Time values within the controller's transition.

    This is a common error in Unity 2018.4 I have found but did not have this issue in Unity 2017 and some other versions of 2018. Might want to check the unity editor patch/fix notes or changelogs to see if you can find out for sure.
     
    IElectric likes this.
  5. Dynam1ke

    Dynam1ke

    Joined:
    Jun 9, 2014
    Posts:
    4
    I also came across this error. For me, it came up when i tried to crossFade an animation from script using invalid hash values. When hashing animator clips always use Animator.StringToHash function.
    Hope that might help someone.