Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

[Possible BUG] Animation clip only playing first frame

Discussion in 'Animation' started by Alkanov, Aug 13, 2017.

  1. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    [Check GIF below]

    In order to avoid drag and dropping sprites (288 times in my case) I created all my anim clips using the AnimCreator script (attached).

    This script created all my animations in less than one minute and they all look exactly the same as when you drag an drop sprites (same Length and FPS).

    The issue now is that those animations (created from script) will only play the first frame unless you change the amount of samples to another number and change it back to 12 (in my case). I would like to point out that I don't think I have any issues with my controller as If I replace these new animations with the old ones (created by drag and dropping) everything works fine.

    So far I thought the issue was with the way i was creating my anims, but when I changed the sample number and everything worked fine I was shocked (spent the whole day on this)..

    GIF here
     

    Attached Files:

  2. VirtuaBoza

    VirtuaBoza

    Joined:
    Dec 24, 2015
    Posts:
    2
    Having same problem. Any luck?
     
  3. VirtuaBoza

    VirtuaBoza

    Joined:
    Dec 24, 2015
    Posts:
    2
    Solved it on my end. Try moving animClip.frameRate = 12f after you call AnimationUtility.SetAnimationClipSettings(animClip, animClipSett)
    That's what worked for me. Good luck!
     
    artisinaltutmos likes this.
  4. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    54
    hey!

    Im glad it worked out for you, I will try that fix myself.

    Thanks!
     
  5. artisinaltutmos

    artisinaltutmos

    Joined:
    Aug 2, 2019
    Posts:
    1
    Omg...I've been at this for days and your simple answer solved my problem in 2019. Thank you!!