Search Unity

Anim Speed: oldWrappedTime > newWrappedTime error???

Discussion in 'Scripting' started by Lostlogic, Jul 18, 2010.

  1. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    I'm using Unity 3 Beta (latest build) and am pausing an animation by setting the animation speed to 0.

    Everything works fine but when I go to set the animation speed back to 1.0 I get an error in the editor that says:

    oldWrappedTime > newWrappedTime

    The animation does resume but why the error? What does it mean?

    I couldn't find a pause function btw; hence, my method for pausing. :)
     
  2. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    That's correct way of pausing an animation.

    It's a bug in Unity - the scenario described should just work without any error. The error message is from internal check in Unity.

    Could you make a minimal reproduction of your problem, submit a bug and send me the same number?

    Thanks,
    Paulius
     
  3. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Sure, I'll try. :)

    FYI, I can't get the animation to resume, no matter what I do, if I call any functions right after I set the speed back to 1.0. I have to issue a wait function or the animation gets lost forever.

    Also, I don't see that error every time. It just happens on every few plays in the editor.
     
  4. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    Hi,

    I just fixed one problem related to "oldWrappedTime > newWrappedTime", but I doesn't sound exactly like your one, so if you could make a small repro-case and submit it in a bug report that would be great.

    Regards,
    Paulius
     
  5. Piot

    Piot

    Joined:
    May 11, 2010
    Posts:
    3
    We get this error when playing our cutscenes. Do you have an ETA when this will be fixed?

    ../Runtime/Animation/AnimationState.cpp at line:185
     
  6. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Folks - to work around this try setting the animation["YourAnim"].speed to a float explicity (if using C#), so for example if your using:

    animation[ "JumpToLedge" ].speed = 0;

    Try replacing that with:

    animation[ "JumpToLedge" ].speed = 0.0f;

    That worked for me and got rid of the problem (so far so good anyhow).

    Now did I read somewhere that this is an ASSERTION left over in the code? Please, promote this coder to management quickly and get someone else warming that chair.