Search Unity

Animator recording seems to fail unpredictably

Discussion in 'Animation' started by LazloBonin, Jul 15, 2015.

  1. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    813
    I started using animator recording to rewind animators. Very simply, I use:
    1. StartRecording() on Start
    2. StopRecording() and StartPlayback() when I'm done recording
    3. playbackTime to set the position back on Update
    4. StopPlayback() and StartRecording() when I'm done rewinding
    In almost all cases, this works perfectly. Sometimes, however, it doesn't: recorderStartTime and recorderStopTime are at -1 when I'm done recording (step 2), as if no recording had ever occured. However, I'm positive that StartRecording has been called -- I tested with a boolean switch. If I try to set the playback time then, I get "Can't playback from recorder, no recorded data found".

    My question is: is there any other condition, other than
    a) I haven't started recording or
    b) I started recording in the same frame as I stopped recording,
    in which it is possible that no recording has occured?
     
    Alex54620 and shottogan like this.