Search Unity

Bug Entry animation skipped at launch

Discussion in 'Animation' started by dedefac96, Feb 9, 2021.

  1. dedefac96

    dedefac96

    Joined:
    Sep 18, 2018
    Posts:
    15
    Hello,
    i don't know if i'm doing something wrong but i would definitly say it's a bug and i'm surprised i couldn't find any thread about it. I've tested it on 2020.2.3f1 and 2019.4.18f1

    I have a simple animator with just a default state which scale up the panel. If I just hit "run" with the gameobject enabled, the animation will not be played, i'm right away set at the end of the default state.
    preview

    On the other hand, if i hit "run" with the gameobject disabled, then i enable it, the animation is properly played.
    preview

    I feel there are conflicts between the initialization of the animator and the project itself.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    If you log Time.deltaTime in Awake, you can see that the first frame on entering play mode usually has a massive value which will cause it to skip well into any animations and other time based stuff. I don't think there's really anything you can do about it.
     
  3. dedefac96

    dedefac96

    Joined:
    Sep 18, 2018
    Posts:
    15
    Thanks for you reply, it'd be great to mention it in the doc instead of looking for a mistake i didn't make x)