Search Unity

anima2d swap frames from frame 1 to 0

Discussion in 'Animation' started by sefiroths, Oct 12, 2017.

  1. sefiroths

    sefiroths

    Joined:
    Dec 13, 2014
    Posts:
    24
    Hi, I've follower this tutorial:

    If I use animation keyframe to swap frames from 0 to 1 works perfectly but if I want to swap from frame 1 to 0 it swaps as soon as I pass the frame.
    I've noticed that frame on the animation change as a float from 0 (starting point) to 1 (where change the frame), so if I loop play forward and back... the animation is not symmetrical because the float frame goes from 1 to 0.9999 where the frame change to frame 0 immediately.
    There is a way to swap texture in an exact moment?
    should I use add event and change it programmatically?
    should I put 2 in framecounter even if I have only frame0 and frame1 so while float frame is from 2 to 1 it takes frame 1 and after from 0.999 to 0 takes frame 0?
    thanks