Search Unity

Bug CrossFade&Play will affect the results of isPlaying

Discussion in 'Animation' started by zhaoguodong233, Jun 3, 2023.

  1. zhaoguodong233

    zhaoguodong233

    Joined:
    Mar 30, 2023
    Posts:
    3
    The thing is, an animation has two clips: stand & TV. By default, stand is played. When switching to TV, both groups use play and crossFade (0.2s) respectively. Then the update polls IsPlaying. As a result, corssFade becomes False one frame earlier.
    Why does this happen?
    the last frame crossFade isplaying = false,normalizedTime == 0 .
    play: isplaying = true normalizedTime == 0.99993908

    logout:Framecount &
    normalizedTime

    if i make crossFade == 0. result is equal. with play.
    upload_2023-6-3_19-57-17.png